Skip to content

Commit

Permalink
Merge pull request #192 from AnyOldName3/modern-curl
Browse files Browse the repository at this point in the history
Use CURL::libcurl target if available
  • Loading branch information
robertosfield authored May 24, 2024
2 parents 9d17de2 + 478b03e commit ad76378
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/curl/build_vars.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,12 @@ if(${vsgXchange_curl})
set(SOURCES ${SOURCES}
curl/curl.cpp
)
set(EXTRA_INCLUDES ${EXTRA_INCLUDES} ${CURL_INCLUDE_DIR})
set(EXTRA_LIBRARIES ${EXTRA_LIBRARIES} ${CURL_LIBRARIES})
if(TARGET CURL::libcurl)
set(EXTRA_LIBRARIES ${EXTRA_LIBRARIES} CURL::libcurl)
else()
set(EXTRA_LIBRARIES ${EXTRA_LIBRARIES} ${CURL_LIBRARIES})
set(EXTRA_INCLUDES ${EXTRA_INCLUDES} ${CURL_INCLUDE_DIR})
endif()
if(NOT BUILD_SHARED_LIBS)
set(FIND_DEPENDENCY ${FIND_DEPENDENCY} "find_dependency(CURL)")
endif()
Expand Down

0 comments on commit ad76378

Please sign in to comment.