/ curl Public
cmake: picky-linker fixes for openssl, ZLIB, H3 and more #10857
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge.
fix HTTP/3 support detection with OpenSSL/quictls built with ZLIB.
(Requires curl be built with ZLIB option also.)
fix HTTP/3 support detection with OpenSSL/quictls/LibreSSL and
linker on Windows.
fix HTTP/3 support detection with wolfSSL to automatically add
ws2_32to the lib list on Windows. For all linkers.
reposition ZLIB (and other compression) detection after TLS
detection, but before calling HTTP/3-support detection via
May be a regression from ebef55a
May fix undefined reference for zlib symbols when building with static dependencies and BUILD_SHARED_LIBS=OFF #10832 (Reported-by: Micah Snyder)
This also seems to fix an odd case, where OpenSSL/quictls is correctly
detected, but its header path is not set while compiling, breaking
src/curl_ntlm_core.c. Reason for this remains undiscovered.
satisfy "picky" linkers such as
ldwith MinGW, that are highly
sensitive to lib order, by also adding brotli to the beginning of the
satisfy "picky" linkers by adding certain Windows systems libs to
the lib list for OpenSSL/LibreSSL. (Might need additional ones for
other forks, such as
Note: It'd make sense to always add
Windows App targets perhaps?),
bcrypt(except old-mingw!) on Windows
at this point. They are almost always required, and if some aren't,
they are ignored by the linker with no effect on final binaries.
With these, a CMake build with gcc/ld almost works ;) Now→ Worked around using
gsasllib is in the wrong position ¯\(ツ)/¯.
CMAKE_C_STANDARD_LIBRARIESto pass it.