mirror of
https://github.com/curl/curl.git
synced 2026-05-30 04:07:27 +03:00
While working #16973, the binutils ld lib order workaround logic regressed so that it modified the wrong target, writing into the system `ZLIB::ZLIB` and `OpenSSL::Crypto` ones a `INTERFACE_LINK_LIBRARIES` property, instead of creating CURL-namespaced targets. Oddly enough, this also fixed the binutils ld lib ordering issue. It seems this property makes CMake insert each referenced library in two more positions (not at the very end though), which allows ld to resolve all symbols in the cases tested in CI. Fix by creating the indented namespaced targets, and also creating these in `curl-config.cmake` to be available when consuming libcurl. Note that the logic continues doing `get_target_property()` on the two system targets above. If these targets are defined manually and miss the `LOCATION` propery, or are defined as aliases, this command may fail. curl expects these targets be created by CMake's `FindZLIB` and `FindOpenSSL` built-in Find modules (or ones compatible). Ref: #20419 The binutils ld issue is reproduced by these CI jobs: - Linux gcc glibc (amd64, arm64) - Windows gcc zlib-classic (x64) Currently using this curl-for-win revision: |
||
|---|---|---|
| .. | ||
| 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 | ||
| FindLibrtmp.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 | ||
| OtherTests.cmake | ||
| PickyWarnings.cmake | ||
| unix-cache.cmake | ||
| Utilities.cmake | ||
| win32-cache.cmake | ||