curl/CMake
Viktor Szakats 3c597ced16
cmake: fix three issues generating lib options in config files
- drop duplicate libs lists next to each other in `libcurl.pc`.
  Logic copied from libssh2.
  Fixing (seen in a local build):
  ```diff
  -Libs.private: -lssh2 -lz -lz -lldap -llber -lssl -lcrypto -lcrypto -lz -lbrotlidec -lbrotlicommon -lzstd -lnghttp2 -licucore -liconv -lpsl -lbacktrace
  +Libs.private: -lssh2 -lz -lldap -llber -lssl -lcrypto -lz -lbrotlidec -lbrotlicommon -lzstd -lnghttp2 -licucore -liconv -lpsl -lbacktrace
  ```
  Refs:
  e1da7b2cb8
  https://github.com/libssh2/libssh2/pull/1621
  6464301820
  https://github.com/libssh2/libssh2/pull/1131

- handle `$<LINK_ONLY:NAMESPACE::NAME>` references.
  Fixing (seen in a local build using libssh2 v1.11.2-DEV):
  ```diff
  -Libs.private: -lssh2 -l$<LINK_ONLY:OpenSSL::Crypto> -lz -lldap -llber [...]
  +Libs.private: -lssh2 -lcrypto -lz -lldap -llber [...]
  ```

- fix `-l-pthread` sneaking into `libcurl.pc`.
  Fixing (seen with Android):
  ```diff
  -Libs.private:  -lz -l-pthread
  +Libs.private: -pthread -lz
  ```
  Refs:
  2b65c20fc6/ports/curl/dependencies.patch (L631-L634)
  70b941a5d2 (diff-7f2c3b2f93cd3478671a603cbd5ef818c7c403a11dc25e1d3539e9b03495a5d3)
  Upstream-patch-by: Kai Pastor

Closes #21654
2026-05-17 22:48:22 +02:00
..
cmake_uninstall.in.cmake
curl-config.in.cmake
CurlSymbolHiding.cmake
CurlTests.c
FindBrotli.cmake
FindCares.cmake
FindGnuTLS.cmake
FindGSS.cmake
FindLDAP.cmake
FindLibbacktrace.cmake
FindLibgsasl.cmake
FindLibidn2.cmake
FindLibpsl.cmake
FindLibssh.cmake
FindLibssh2.cmake
FindLibuv.cmake
FindMbedTLS.cmake
FindNettle.cmake
FindNGHTTP2.cmake
FindNGHTTP3.cmake
FindNGTCP2.cmake
FindQuiche.cmake
FindRustls.cmake
FindWolfSSL.cmake
FindZstd.cmake
Macros.cmake cmake: fix three issues generating lib options in config files 2026-05-17 22:48:22 +02:00
OtherTests.cmake
PickyWarnings.cmake
unix-cache.cmake
Utilities.cmake
win32-cache.cmake