Skip to content

Commit

Permalink
fix curlpp and dynamic builds on linux
Browse files Browse the repository at this point in the history
  • Loading branch information
cbezault committed Sep 25, 2019
1 parent c389542 commit 7358190
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 37 deletions.
10 changes: 10 additions & 0 deletions ports/curl/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,16 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
else()
file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/curl-config ${CURRENT_PACKAGES_DIR}/debug/bin/curl-config)

file(GLOB FILES LIST_DIRECTORIES TRUE ${CURRENT_PACKAGES_DIR}/bin/*)
if (FILES STREQUAL "")
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
endif()

file(GLOB FILES LIST_DIRECTORIES TRUE ${CURRENT_PACKAGES_DIR}/debug/bin/*)
if (FILES STREQUAL "")
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin)
endif()
endif()

file(READ ${CURRENT_PACKAGES_DIR}/include/curl/curl.h CURL_H)
Expand Down
13 changes: 12 additions & 1 deletion ports/curl/vcpkg-cmake-wrapper.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,17 @@ if(TARGET CURL::libcurl)
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()
endif()

if(NOT _curl_location_debug AND NOT _curl_location_release)
get_target_property(_curl_location_debug CURL::libcurl IMPORTED_LOCATION_DEBUG)
get_target_property(_curl_location_release CURL::libcurl IMPORTED_LOCATION_RELEASE)
endif()

if(NOT _curl_link_libraries)
set(_curl_link_libraries)
endif()

set(CURL_INCLUDE_DIRS "${_curl_include_dirs}")
set(CURL_LIBRARY_DEBUG "${_curl_location_debug}")
set(CURL_LIBRARY_RELEASE "${_curl_location_release}")
Expand All @@ -38,4 +44,9 @@ if(TARGET CURL::libcurl)

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

set(_curl_include_dirs)
set(_curl_link_libraries)
set(_curl_location_debug)
set(_curl_location_release)
endif()
1 change: 0 additions & 1 deletion ports/curlpp/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
)

configure_file(
${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake
${CURRENT_PACKAGES_DIR}/share/unofficial-${PORT}
@ONLY
)
Expand Down
35 changes: 0 additions & 35 deletions ports/curlpp/vcpkg-cmake-wrapper.cmake

This file was deleted.

0 comments on commit 7358190

Please sign in to comment.