mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-05 13:20:47 -06:00
Build: Use imported target CURL::libcurl instead of variables
This commit is contained in:
@@ -750,10 +750,10 @@ target_link_libraries(
|
|||||||
PUBLIC
|
PUBLIC
|
||||||
cmstd
|
cmstd
|
||||||
cmsys
|
cmsys
|
||||||
|
CURL::libcurl
|
||||||
EXPAT::EXPAT
|
EXPAT::EXPAT
|
||||||
LibArchive::LibArchive
|
LibArchive::LibArchive
|
||||||
ZLIB::ZLIB
|
ZLIB::ZLIB
|
||||||
${CMAKE_CURL_LIBRARIES}
|
|
||||||
${CMAKE_JSONCPP_LIBRARIES}
|
${CMAKE_JSONCPP_LIBRARIES}
|
||||||
${CMAKE_LIBUV_LIBRARIES}
|
${CMAKE_LIBUV_LIBRARIES}
|
||||||
${CMAKE_LIBRHASH_LIBRARIES}
|
${CMAKE_LIBRHASH_LIBRARIES}
|
||||||
@@ -1002,9 +1002,8 @@ target_include_directories(
|
|||||||
CTestLib
|
CTestLib
|
||||||
PUBLIC
|
PUBLIC
|
||||||
"${CMake_SOURCE_DIR}/Source/CTest"
|
"${CMake_SOURCE_DIR}/Source/CTest"
|
||||||
${CMAKE_CURL_INCLUDES}
|
|
||||||
)
|
)
|
||||||
target_link_libraries(CTestLib PUBLIC CMakeLib ${CMAKE_CURL_LIBRARIES})
|
target_link_libraries(CTestLib PUBLIC CMakeLib)
|
||||||
|
|
||||||
#
|
#
|
||||||
# Build CPackLib
|
# Build CPackLib
|
||||||
|
|||||||
@@ -148,11 +148,7 @@ if(CMAKE_USE_SYSTEM_CURL)
|
|||||||
message(FATAL_ERROR
|
message(FATAL_ERROR
|
||||||
"CMAKE_USE_SYSTEM_CURL is ON but a curl is not found!")
|
"CMAKE_USE_SYSTEM_CURL is ON but a curl is not found!")
|
||||||
endif()
|
endif()
|
||||||
set(CMAKE_CURL_INCLUDES ${CURL_INCLUDE_DIRS})
|
|
||||||
set(CMAKE_CURL_LIBRARIES ${CURL_LIBRARIES})
|
|
||||||
else()
|
else()
|
||||||
set(CMAKE_CURL_INCLUDES)
|
|
||||||
set(CMAKE_CURL_LIBRARIES cmcurl)
|
|
||||||
if(CMAKE_TESTS_CDASH_SERVER)
|
if(CMAKE_TESTS_CDASH_SERVER)
|
||||||
set(CMAKE_CURL_TEST_URL "${CMAKE_TESTS_CDASH_SERVER}/user.php")
|
set(CMAKE_CURL_TEST_URL "${CMAKE_TESTS_CDASH_SERVER}/user.php")
|
||||||
endif()
|
endif()
|
||||||
@@ -174,6 +170,7 @@ else()
|
|||||||
set(NGHTTP2_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Utilities/cmnghttp2/lib/includes)
|
set(NGHTTP2_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Utilities/cmnghttp2/lib/includes)
|
||||||
endif()
|
endif()
|
||||||
add_subdirectory(Utilities/cmcurl)
|
add_subdirectory(Utilities/cmcurl)
|
||||||
|
add_library(CURL::libcurl ALIAS cmcurl)
|
||||||
CMAKE_SET_TARGET_FOLDER(cmcurl "Utilities/3rdParty")
|
CMAKE_SET_TARGET_FOLDER(cmcurl "Utilities/3rdParty")
|
||||||
CMAKE_SET_TARGET_FOLDER(LIBCURL "Utilities/3rdParty")
|
CMAKE_SET_TARGET_FOLDER(LIBCURL "Utilities/3rdParty")
|
||||||
if(NOT CMAKE_USE_SYSTEM_NGHTTP2)
|
if(NOT CMAKE_USE_SYSTEM_NGHTTP2)
|
||||||
|
|||||||
Reference in New Issue
Block a user