Skip to content

Commit

Permalink
Use upstream CURL::libcurl imported target in FindIgnCURL.cmake if av…
Browse files Browse the repository at this point in the history
…ailable
  • Loading branch information
traversaro committed Sep 14, 2019
1 parent d6578aa commit 2bd7d37
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cmake/FindIgnCURL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ if(${IgnCURL_FOUND})

# Older versions of curl don't create imported targets, so we will create
# them here if they have not been provided.
if(TARGET CURL::libcurl AND NOT TARGET curl::curl)
add_library(curl::curl INTERFACE IMPORTED)
set_target_properties(curl::curl PROPERTIES
INTERFACE_LINK_LIBRARIES CURL::libcurl)
endif()

include(IgnImportTarget)

if(NOT TARGET curl::curl)
Expand Down

0 comments on commit 2bd7d37

Please sign in to comment.