cmake: Fix the FindCURL module (#351573)
This commit is contained in:
commit
6b50ea9237
@ -0,0 +1,32 @@
|
|||||||
|
diff --git a/Modules/FindCURL.cmake b/Modules/FindCURL.cmake
|
||||||
|
index 5ce8a9046b..f7361308b7 100644
|
||||||
|
--- a/Modules/FindCURL.cmake
|
||||||
|
+++ b/Modules/FindCURL.cmake
|
||||||
|
@@ -239,9 +239,24 @@ if(CURL_FOUND)
|
||||||
|
IMPORTED_LOCATION_DEBUG "${CURL_LIBRARY_DEBUG}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
- if(CURL_USE_STATIC_LIBS AND MSVC)
|
||||||
|
- set_target_properties(CURL::libcurl PROPERTIES
|
||||||
|
- INTERFACE_LINK_LIBRARIES "normaliz.lib;ws2_32.lib;wldap32.lib")
|
||||||
|
+ if(PC_CURL_FOUND)
|
||||||
|
+ if(PC_CURL_LINK_LIBRARIES)
|
||||||
|
+ set_property(TARGET CURL::libcurl PROPERTY
|
||||||
|
+ INTERFACE_LINK_LIBRARIES "${PC_CURL_LINK_LIBRARIES}")
|
||||||
|
+ endif()
|
||||||
|
+ if(PC_CURL_LDFLAGS_OTHER)
|
||||||
|
+ set_property(TARGET CURL::libcurl PROPERTY
|
||||||
|
+ INTERFACE_LINK_OPTIONS "${PC_CURL_LDFLAGS_OTHER}")
|
||||||
|
+ endif()
|
||||||
|
+ if(PC_CURL_CFLAGS_OTHER)
|
||||||
|
+ set_property(TARGET CURL::libcurl PROPERTY
|
||||||
|
+ INTERFACE_COMPILE_OPTIONS "${PC_CURL_CFLAGS_OTHER}")
|
||||||
|
+ endif()
|
||||||
|
+ else()
|
||||||
|
+ if(CURL_USE_STATIC_LIBS AND MSVC)
|
||||||
|
+ set_target_properties(CURL::libcurl PROPERTIES
|
||||||
|
+ INTERFACE_LINK_LIBRARIES "normaliz.lib;ws2_32.lib;wldap32.lib")
|
||||||
|
+ endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
endif()
|
@ -76,7 +76,12 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
substituteAll {
|
substituteAll {
|
||||||
src = ./007-darwin-bsd-ps-abspath.diff;
|
src = ./007-darwin-bsd-ps-abspath.diff;
|
||||||
ps = lib.getExe ps;
|
ps = lib.getExe ps;
|
||||||
});
|
})
|
||||||
|
++ [
|
||||||
|
# Backport of https://gitlab.kitware.com/cmake/cmake/-/merge_requests/9900
|
||||||
|
# Needed to corretly link curl in pkgsStatic.
|
||||||
|
./008-FindCURL-Add-more-target-properties-from-pkg-config.diff
|
||||||
|
];
|
||||||
|
|
||||||
outputs = [ "out" ] ++ lib.optionals buildDocs [ "man" "info" ];
|
outputs = [ "out" ] ++ lib.optionals buildDocs [ "man" "info" ];
|
||||||
separateDebugInfo = true;
|
separateDebugInfo = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user