Debian Codegraph @

cmake-proxies/cmake-modules/dependencies/curl.cmake

raw
1 if( ${_OPT}use_curl STREQUAL "system" )
2 # On macOS - CURL::libcurl is not defined by FindCURL for some reason
3
4 if(NOT TARGET CURL::libcurl)
5 add_library(CURL::libcurl UNKNOWN IMPORTED)
6 set_target_properties(CURL::libcurl PROPERTIES
7 INTERFACE_INCLUDE_DIRECTORIES "${CURL_INCLUDE_DIRS}")
8
9 if(EXISTS "${CURL_LIBRARY}")
10 set_target_properties(CURL::libcurl PROPERTIES
11 IMPORTED_LINK_INTERFACE_LANGUAGES "C"
12 IMPORTED_LOCATION "${CURL_LIBRARY}")
13 endif()
14
15 if(CURL_LIBRARY_RELEASE)
16 set_property(TARGET CURL::libcurl APPEND PROPERTY
17 IMPORTED_CONFIGURATIONS RELEASE)
18 set_target_properties(CURL::libcurl PROPERTIES
19 IMPORTED_LINK_INTERFACE_LANGUAGES "C"
20 IMPORTED_LOCATION_RELEASE "${CURL_LIBRARY_RELEASE}")
21 endif()
22 if(CURL_LIBRARY_DEBUG)
23 set_property(TARGET CURL::libcurl APPEND PROPERTY
24 IMPORTED_CONFIGURATIONS DEBUG)
25 set_target_properties(CURL::libcurl PROPERTIES
26 IMPORTED_LINK_INTERFACE_LANGUAGES "C"
27 IMPORTED_LOCATION_DEBUG "${CURL_LIBRARY_DEBUG}")
28 endif()
29 endif()
30 endif()