From: Viktor Szakats Date: Sat, 25 Jan 2025 13:54:47 +0000 (+0100) Subject: cmake: drop `CURL_USE_PKGCONFIG` from `curl-config.cmake.in` X-Git-Tag: curl-8_12_0~58 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1bc83abfb75bd1b3ae140b1306cd14e232f2939c;p=thirdparty%2Fcurl.git cmake: drop `CURL_USE_PKGCONFIG` from `curl-config.cmake.in` This variable was meant to be used by curl Find modules, but it turns out it makes no sense to use those from `curl-config.cmake.in`. It means this variable was not used before and will not be used in the future, and therefore safe to delete. Also add missing macros passed to `curl-config.cmake` to comment. Ref: https://github.com/curl/curl/pull/14930#discussion_r1929537797 Closes #16087 --- diff --git a/CMake/curl-config.cmake.in b/CMake/curl-config.cmake.in index edb5b1d34a..a4df052c2a 100644 --- a/CMake/curl-config.cmake.in +++ b/CMake/curl-config.cmake.in @@ -23,16 +23,6 @@ ########################################################################### @PACKAGE_INIT@ -# Keep condition in sync with CMake/curl-config.cmake.in -if((UNIX AND NOT ANDROID AND (NOT APPLE OR CMAKE_SYSTEM_NAME MATCHES "Darwin")) OR - VCPKG_TOOLCHAIN OR - (MINGW AND NOT CMAKE_CROSSCOMPILING)) - set(_curl_use_pkgconfig_default ON) -else() - set(_curl_use_pkgconfig_default OFF) -endif() -option(CURL_USE_PKGCONFIG "Enable pkg-config to detect @PROJECT_NAME@ dependencies" ${_curl_use_pkgconfig_default}) - include(CMakeFindDependencyMacro) if("@USE_OPENSSL@") find_dependency(OpenSSL "@OPENSSL_VERSION_MAJOR@") diff --git a/CMakeLists.txt b/CMakeLists.txt index 5e138941d4..f66b7e1fcb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -322,7 +322,6 @@ else() endif() # Override to force-disable or force-enable the use of pkg-config. -# Keep condition in sync with CMake/curl-config.cmake.in if((UNIX AND NOT ANDROID AND (NOT APPLE OR CMAKE_SYSTEM_NAME MATCHES "Darwin")) OR VCPKG_TOOLCHAIN OR (MINGW AND NOT CMAKE_CROSSCOMPILING)) @@ -2397,8 +2396,8 @@ if(NOT CURL_DISABLE_INSTALL) # CURLVERSION # LIB_SELECTED # TARGETS_EXPORT_NAME - # USE_OPENSSL - # HAVE_LIBZ + # USE_OPENSSL OPENSSL_VERSION_MAJOR + # HAVE_LIBZ ZLIB_VERSION_MAJOR # CURL_SUPPORTED_FEATURES_LIST # CURL_SUPPORTED_PROTOCOLS_LIST configure_package_config_file("CMake/curl-config.cmake.in"