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()