Skip to content

Commit c119d09

Browse files
committed
cmake UPDATE link libcurl directly if no config file found
Refs #1582
1 parent 7355678 commit c119d09

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

CMakeLists.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,13 @@ if(ENABLE_SSH_TLS)
259259

260260
# dependencies - libcurl
261261
find_package(CURL 7.30.0 REQUIRED)
262-
target_link_libraries(netconf2 CURL::libcurl)
262+
if(TARGET CURL::libcurl)
263+
target_link_libraries(netconf2 CURL::libcurl)
264+
else()
265+
target_link_libraries(netconf2 ${CURL_LIBRARIES})
266+
list(APPEND CMAKE_REQUIRED_LIBRARIES ${CURL_LIBRARY})
267+
include_directories(${CURL_INCLUDE_DIRS})
268+
endif()
263269

264270
# crypt (if not found, assume no library needs to be linked)
265271
if(${CMAKE_SYSTEM_NAME} MATCHES "QNX")

0 commit comments

Comments
 (0)