[Client:C] [C-libcurl] cmake support specify path (#11790)

This commit is contained in:
Pang
2022-03-06 22:39:21 +08:00
committed by GitHub
parent 188f37f5a9
commit 7466bc2ed6

View File

@@ -34,12 +34,17 @@ set(PROJECT_VERSION_MAJOR 0)
set(PROJECT_VERSION_MINOR 0)
set(PROJECT_VERSION_PATCH 1)
find_package(CURL 7.58.0 REQUIRED)
if(CURL_FOUND)
if( (DEFINED CURL_INCLUDE_DIR) AND (DEFINED CURL_LIBRARIES))
include_directories(${CURL_INCLUDE_DIR})
set(PLATFORM_LIBRARIES ${PLATFORM_LIBRARIES} ${CURL_LIBRARIES} )
else(CURL_FOUND)
message(FATAL_ERROR "Could not find the CURL library and development files.")
else()
find_package(CURL 7.58.0 REQUIRED)
if(CURL_FOUND)
include_directories(${CURL_INCLUDE_DIR})
set(PLATFORM_LIBRARIES ${PLATFORM_LIBRARIES} ${CURL_LIBRARIES} )
else(CURL_FOUND)
message(FATAL_ERROR "Could not find the CURL library and development files.")
endif()
endif()
set(SRCS