← Commit list

6437bd79ae

Viktor Szakats
Viktor Szakats
2026-01-14
SUCCESS Duration: 404s

Subject

cmake: avoid setting custom property on built-in interface targets

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

CMakeLists.txt+7 -3
@@ -767,7 +767,6 @@ if(CURL_USE_OPENSSL)
# Depend on OpenSSL via imported targets. This allows our dependents to
# get our dependencies transitively.
list(APPEND CURL_LIBS OpenSSL::SSL OpenSSL::Crypto)
- set_target_properties(OpenSSL::SSL PROPERTIES INTERFACE_LIBCURL_PC_MODULES "openssl")
if(CURL_DEFAULT_SSL_BACKEND AND CURL_DEFAULT_SSL_BACKEND STREQUAL "openssl")
set(_valid_default_ssl_backend TRUE)
@@ -907,7 +906,6 @@ if(ZLIB_FOUND)
# Depend on ZLIB via imported targets. This allows our dependents to
# get our dependencies transitively.
list(APPEND CURL_LIBS ZLIB::ZLIB)
- set_target_properties(ZLIB::ZLIB PROPERTIES INTERFACE_LIBCURL_PC_MODULES "zlib")
endif()
set(HAVE_BROTLI OFF)
@@ -2154,7 +2152,13 @@ if(NOT CURL_DISABLE_INSTALL)
if(NOT _libname AND NOT _libs AND NOT _libdirs)
message(WARNING "Bad lib in library list: ${_lib}")
endif()
- get_target_property(_modules "${_lib}" INTERFACE_LIBCURL_PC_MODULES)
+ if(_lib STREQUAL OpenSSL::SSL)
+ set(_modules "openssl")
+ elseif(_lib STREQUAL ZLIB::ZLIB)
+ set(_modules "zlib")
+ else()
+ get_target_property(_modules "${_lib}" INTERFACE_LIBCURL_PC_MODULES)
+ endif()
if(_modules)
list(APPEND LIBCURL_PC_REQUIRES_PRIVATE "${_modules}")
endif()