diff options
| author | Robert Schumacher <roschuma@microsoft.com> | 2019-11-22 09:47:40 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-11-22 09:47:40 -0800 |
| commit | 45f4b820e5743b89bca3508ba2028cdd5d8bbd17 (patch) | |
| tree | f874a8c4a7392309bdbb86447288597ec0a4a281 /ports/curlpp | |
| parent | 62d67d3bf8eeff1afa8009041fd08b8822676b7b (diff) | |
| parent | 8831e8f25f1ff6546ee4a5291b91d599421637b3 (diff) | |
| download | vcpkg-45f4b820e5743b89bca3508ba2028cdd5d8bbd17.tar.gz vcpkg-45f4b820e5743b89bca3508ba2028cdd5d8bbd17.zip | |
Merge branch 'master' into vcpkg_nuget
Diffstat (limited to 'ports/curlpp')
| -rw-r--r-- | ports/curlpp/CONTROL | 2 | ||||
| -rw-r--r-- | ports/curlpp/fix-cmake.patch | 2 | ||||
| -rw-r--r-- | ports/curlpp/portfile.cmake | 6 | ||||
| -rw-r--r-- | ports/curlpp/vcpkg-cmake-wrapper.cmake | 40 |
4 files changed, 7 insertions, 43 deletions
diff --git a/ports/curlpp/CONTROL b/ports/curlpp/CONTROL index 1c6c07f32..538d18ed5 100644 --- a/ports/curlpp/CONTROL +++ b/ports/curlpp/CONTROL @@ -1,4 +1,4 @@ Source: curlpp -Version: 2018-06-15 +Version: 2018-06-15-1 Description: C++ wrapper around libcURL Build-Depends: curl diff --git a/ports/curlpp/fix-cmake.patch b/ports/curlpp/fix-cmake.patch index 3930b65c2..a7cd79413 100644 --- a/ports/curlpp/fix-cmake.patch +++ b/ports/curlpp/fix-cmake.patch @@ -29,7 +29,7 @@ index 8b183a0..a801ae8 100644 -SET_TARGET_PROPERTIES(${PROJECT_NAME}_static PROPERTIES PREFIX "lib") -target_link_libraries(${PROJECT_NAME}_static ${CURL_LIBRARIES} ${CONAN_LIBS}) +SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES PREFIX "lib") -+target_link_libraries(${PROJECT_NAME} ${CURL_LIBRARIES} ${CONAN_LIBS}) ++target_link_libraries(${PROJECT_NAME} CURL::libcurl) +endif() + +target_include_directories(${PROJECT_NAME} PUBLIC $<INSTALL_INTERFACE:include>) diff --git a/ports/curlpp/portfile.cmake b/ports/curlpp/portfile.cmake index aaa9c51ab..e08a2868e 100644 --- a/ports/curlpp/portfile.cmake +++ b/ports/curlpp/portfile.cmake @@ -29,12 +29,6 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL static) ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin ) - - configure_file( - ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake - ${CURRENT_PACKAGES_DIR}/share/unofficial-${PORT} - @ONLY - ) endif() # Handle copyright diff --git a/ports/curlpp/vcpkg-cmake-wrapper.cmake b/ports/curlpp/vcpkg-cmake-wrapper.cmake index 0bffdc6b4..a7f88cd72 100644 --- a/ports/curlpp/vcpkg-cmake-wrapper.cmake +++ b/ports/curlpp/vcpkg-cmake-wrapper.cmake @@ -1,35 +1,5 @@ -_find_package(${ARGS})
-
-if("@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static")
- if(TARGET unofficial::curlpp::curlpp)
- # Fix CURL dependencies. See:
- # https://github.com/Microsoft/vcpkg/issues/4312
-
- set(_libs "")
-
- find_package(CURL REQUIRED)
-
- set(ZLIB_ROOT ${CMAKE_PREFIX_PATH}) # Prefer Zlib installed via `vcpkg`
- find_package(ZLIB)
- unset(ZLIB_ROOT)
-
- list(APPEND _libs ${CURL_LIBRARIES} ZLIB::ZLIB)
-
- find_package(OpenSSL QUIET)
- if(OPENSSL_FOUND)
- list(APPEND _libs OpenSSL::SSL OpenSSL::Crypto)
- endif()
-
- find_package(Threads REQUIRED)
- list(APPEND _libs Threads::Threads)
-
- if(CMAKE_SYSTEM_NAME STREQUAL "Windows" OR CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
- list(APPEND _libs Ws2_32 Crypt32)
- endif()
-
- set_target_properties(
- unofficial::curlpp::curlpp
- PROPERTIES INTERFACE_LINK_LIBRARIES "${_libs}"
- )
- endif()
-endif()
+set(FIND_CURLPP_ARGS ${ARGS}) +include(CMakeFindDependencyMacro) +find_dependency(CURL) + +_find_package(${FIND_CURLPP_ARGS}) |
