mirror of
https://github.com/curl/curl.git
synced 2026-04-14 22:41:40 +03:00
cmake: move pkg-config names to Find modules
Make the Find modules set and return their respective `pkg-config`
module name(s) to the CMake build process, which then adds those
to the `Requires:` list.
Before this patch, `pkg-config` module names were maintainted in two
separate places. After this patch, they are maintained in the Find
modules for dependencies that have one (most do).
Re-align existing modules with this change: msh3, mbedtls, rustls.
These modules return their `pkg-config` module name only when
detected via `pkg-config`.
Follow-up to d511ec8b0a #15573
Closes #15800
This commit is contained in:
parent
a1eaa12a83
commit
fb1883d226
20 changed files with 102 additions and 44 deletions
|
|
@ -34,14 +34,17 @@
|
|||
# - `LIBPSL_INCLUDE_DIRS`: The libpsl include directories.
|
||||
# - `LIBPSL_LIBRARIES`: The libpsl library names.
|
||||
# - `LIBPSL_LIBRARY_DIRS`: The libpsl library directories.
|
||||
# - `LIBPSL_PC_REQUIRES`: The libpsl pkg-config packages.
|
||||
# - `LIBPSL_CFLAGS`: Required compiler flags.
|
||||
# - `LIBPSL_VERSION`: Version of libpsl.
|
||||
|
||||
set(LIBPSL_PC_REQUIRES "libpsl")
|
||||
|
||||
if(CURL_USE_PKGCONFIG AND
|
||||
NOT DEFINED LIBPSL_INCLUDE_DIR AND
|
||||
NOT DEFINED LIBPSL_LIBRARY)
|
||||
find_package(PkgConfig QUIET)
|
||||
pkg_check_modules(LIBPSL "libpsl")
|
||||
pkg_check_modules(LIBPSL ${LIBPSL_PC_REQUIRES})
|
||||
endif()
|
||||
|
||||
if(LIBPSL_FOUND AND LIBPSL_INCLUDE_DIRS)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue