mirror of
https://github.com/curl/curl.git
synced 2026-04-14 22:31:41 +03:00
cmake/Find: set <Modulename>_FOUND for compatibility when found via pkg-config
For Find modules where `<Modulename>` is not fully uppercase. `<Modulename>` is case-exact name used in the Find modules filename: `CMake/Find<Moduleame>.cmake`. `find_package_handle_standard_args()` sets both `<MODULENAME>_FOUND` and `<Modulename>_FOUND` when detecting the dependency. Some CMake code relies on this and 3rd-party code may rely on it too. Make sure to set the latter variant when detecting the dependency via `pkg-config`, where we don't call `find_package_handle_standard_args()`. CMake sets these variable to `TRUE` (not `ON` or `1`). Replicate this for compatibility. Closes #16153
This commit is contained in:
parent
ffd6132da6
commit
2b9b3ec579
15 changed files with 15 additions and 0 deletions
|
|
@ -48,6 +48,7 @@ if(CURL_USE_PKGCONFIG AND
|
|||
endif()
|
||||
|
||||
if(LIBPSL_FOUND AND LIBPSL_INCLUDE_DIRS)
|
||||
set(Libpsl_FOUND TRUE)
|
||||
string(REPLACE ";" " " LIBPSL_CFLAGS "${LIBPSL_CFLAGS}")
|
||||
message(STATUS "Found Libpsl (via pkg-config): ${LIBPSL_INCLUDE_DIRS} (found version \"${LIBPSL_VERSION}\")")
|
||||
else()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue