]> git.ipfire.org Git - thirdparty/curl.git/commit
cmake: sync GSS config code with other deps
authorViktor Szakats <commit@vsz.me>
Mon, 11 Nov 2024 10:03:08 +0000 (11:03 +0100)
committerViktor Szakats <commit@vsz.me>
Thu, 14 Nov 2024 20:52:45 +0000 (21:52 +0100)
commite0e93d43146cd0832d387c82570df58ffdcd2cfb
tree699b26c61ef9035f1e1243b24af895fb8d585c2c
parent22c45844afd20c217b2c94911020118ae565c2d3
cmake: sync GSS config code with other deps

- stop passing explicit libpaths via `CMAKE_SHARED_LINKER_FLAGS` and
  `CMAKE_EXE_LINKER_FLAGS`. `link_directories()` is doing that already.
- use `curl_required_libpaths()` to pass libpaths to the feature test.
Reported-by: Daniel Engberg
  Fixes #15536
  Also fixes GSS feature detection with non-gcc/clang compilers,
  such as MSVC.
- add libpaths to `CURL_LIBPATHS`.
- move `GSS_CFLAGS`, `GSS_LDFLAGS` stringifications to FindGSS.
  To match the `CFLAGS` format returned by the rest of Find modules.
- reorder calls to match other dependencies.
- don't extend system `LDFLAGS` when FindGSS did not return any.
- ignore `LDFLAGS` when detecting GSS via `pkg-config`. `LDFLAGS` holds
  a copy of libpaths and libs in this case. Ignore those to avoid these
  duplicates making into `libcurl.pc` and `curl-config`. Also syncing
  behavior with other Find modules which also ignore raw `LDFLAGS`.
- ignore raw `LDFLAGS` coming from `krb5-config --libs`. FindGSS
  no longer returns dependency-specific `LDFLAGS` after this. Syncing
  behavior with other Find modules.
- reduce scope of checker state push/pop/set.

Closes #15545
CMake/FindGSS.cmake
CMakeLists.txt