cmake: silence bad library Threads::Threads warning

Seen on macOS:
```
CMake Warning at CMakeLists.txt:2158 (message):
  Bad lib in library list: Threads::Threads
```

Follow-up to 2d546d239e #21163

Closes #21170
This commit is contained in:
Viktor Szakats 2026-03-31 04:50:23 +02:00
parent e49190f9f3
commit b9690e9cd1
No known key found for this signature in database

View file

@ -2154,7 +2154,7 @@ if(NOT CURL_DISABLE_INSTALL)
curl_collect_target_link_options("${_lib}") # look into the target recursively
list(APPEND _explicit_libdirs ${_libdirs})
list(APPEND _explicit_libs ${_libs})
if(NOT _libs AND NOT _libdirs)
if(NOT _libs AND NOT _libdirs AND NOT _lib STREQUAL Threads::Threads)
message(WARNING "Bad lib in library list: ${_lib}")
endif()
if(_lib STREQUAL OpenSSL::SSL AND NOT HAVE_BORINGSSL) # BoringSSL does not provide openssl.pc