Skip to content

Commit

Permalink
get .libs
Browse files Browse the repository at this point in the history
  • Loading branch information
cbezault committed Sep 25, 2019
1 parent 9030807 commit c389542
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions ports/curl/vcpkg-cmake-wrapper.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,26 @@ endif()

if(TARGET CURL::libcurl)
set(CURL_FOUND TRUE)

get_target_property(_curl_include_dirs CURL::libcurl INTERFACE_INCLUDE_DIRECTORIES)
get_target_property(_curl_location_debug CURL::libcurl IMPORTED_LOCATION_DEBUG)
get_target_property(_curl_location_release CURL::libcurl IMPORTED_LOCATION_RELEASE)
get_target_property(_curl_link_libraries CURL::libcurl INTERFACE_LINK_LIBRARIES)

if (CMAKE_SYSTEM_NAME STREQUAL "Windows" OR CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
get_target_property(_curl_location_debug CURL::libcurl IMPORTED_IMPLIB_DEBUG)
get_target_property(_curl_location_release CURL::libcurl IMPORTED_IMPLIB_RELEASE)
else()
get_target_property(_curl_location_debug CURL::libcurl IMPORTED_LOCATION_DEBUG)
get_target_property(_curl_location_release CURL::libcurl IMPORTED_LOCATION_RELEASE)
endif()

set(CURL_INCLUDE_DIRS "${_curl_include_dirs}")
set(CURL_LIBRARY_DEBUG "${_curl_location_debug}")
set(CURL_LIBRARY_RELEASE "${_curl_location_release}")

#For libraries which rely on CURL_LIBRAR(Y/IES)
#For builds which rely on CURL_LIBRAR(Y/IES)
include(${CMAKE_ROOT}/Modules/SelectLibraryConfigurations.cmake)
select_library_configurations(CURL)

set(CURL_LIBRARIES "${_curl_link_libraries}" "${CURL_LIBRARY}")
set(CURL_LIBRARIES ${CURL_LIBRARY} ${_curl_link_libraries})
set(CURL_VERSION_STRING "${CURL_VERSION}")
endif()

0 comments on commit c389542

Please sign in to comment.