aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpast-due <30942300+past-due@users.noreply.github.com>2019-09-27 00:31:33 -0400
committerCurtis J Bezault <curtbezault@gmail.com>2019-09-26 21:31:33 -0700
commit67a9305c75f89c6a7e229c94d1800b598f0666b3 (patch)
treee702e453a71551bc78ce47d29ac6ffd90fc9bc35
parentee0bfad1cfa11e048823e2d02d9f619db7d94a3f (diff)
downloadvcpkg-67a9305c75f89c6a7e229c94d1800b598f0666b3.tar.gz
vcpkg-67a9305c75f89c6a7e229c94d1800b598f0666b3.zip
[curl] Update to 7.66.0 (#7331)
* [curl] Update to 7.65.3 * [curl] Remove USAGE (Use auto-generated message about exported config.) * Add wrapper * [curl] Update to 7.66.0 * Add wrapper to curl * drop parent_scope * add change that didn't make it * Populate CURL_LIBRARY * Fix transitive dependency * try to actually set LIBRARIES * get .libs * fix curlpp and dynamic builds on linux * add @cenit's suggestion and fix typo in curlpp * modify PDAL patch
-rw-r--r--ports/curl/CONTROL2
-rw-r--r--ports/curl/portfile.cmake20
-rw-r--r--ports/curl/usage5
-rw-r--r--ports/curl/vcpkg-cmake-wrapper.cmake42
-rw-r--r--ports/curlpp/portfile.cmake6
-rw-r--r--ports/curlpp/vcpkg-cmake-wrapper.cmake35
-rw-r--r--ports/pdal/PDALConfig.patch3
7 files changed, 60 insertions, 53 deletions
diff --git a/ports/curl/CONTROL b/ports/curl/CONTROL
index 72d5d3e66..9c0471e42 100644
--- a/ports/curl/CONTROL
+++ b/ports/curl/CONTROL
@@ -1,5 +1,5 @@
Source: curl
-Version: 7.65.2-1
+Version: 7.66.0
Build-Depends: zlib
Homepage: https://github.com/curl/curl
Description: A library for transferring data with URLs
diff --git a/ports/curl/portfile.cmake b/ports/curl/portfile.cmake
index 49d4d12e6..e315d23a3 100644
--- a/ports/curl/portfile.cmake
+++ b/ports/curl/portfile.cmake
@@ -3,8 +3,8 @@ include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO curl/curl
- REF curl-7_65_2
- SHA512 8e06377a6d8837a4c2cd96f978f0ac848b9472500fd25983bb1f9e5f52d9d6f7ff0c71d443587a979cf80fd19412bb64b9362b774cf91e02479fdfad7e085b16
+ REF curl-7_66_0
+ SHA512 0b02b6117ab69e848219fa59b25e4254934d841fbc3e2a70ccfdcb417ab7fc46a10dd703a25fbe8a2a98a59cbc73ad6b9298f5668a7345f7910010b958de4d21
HEAD_REF master
PATCHES
0001_cmake.patch
@@ -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)
@@ -185,8 +195,8 @@ else()
endif()
file(WRITE ${CURRENT_PACKAGES_DIR}/include/curl/curl.h "${CURL_H}")
-vcpkg_copy_pdbs()
+file(INSTALL ${CURRENT_PORT_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/curl)
-file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
+vcpkg_copy_pdbs()
-vcpkg_test_cmake(PACKAGE_NAME CURL MODULE)
+vcpkg_test_cmake(PACKAGE_NAME CURL)
diff --git a/ports/curl/usage b/ports/curl/usage
deleted file mode 100644
index d43e7112e..000000000
--- a/ports/curl/usage
+++ /dev/null
@@ -1,5 +0,0 @@
-The package curl is compatible with built-in CMake targets:
-
- find_package(CURL REQUIRED)
- target_link_libraries(main PRIVATE ${CURL_LIBRARIES})
- target_include_directories(main PRIVATE ${CURL_INCLUDE_DIRS})
diff --git a/ports/curl/vcpkg-cmake-wrapper.cmake b/ports/curl/vcpkg-cmake-wrapper.cmake
new file mode 100644
index 000000000..c7fbdba91
--- /dev/null
+++ b/ports/curl/vcpkg-cmake-wrapper.cmake
@@ -0,0 +1,42 @@
+list(REMOVE_ITEM ARGS "NO_MODULE")
+list(REMOVE_ITEM ARGS "CONFIG")
+list(REMOVE_ITEM ARGS "MODULE")
+
+_find_package(${ARGS} CONFIG)
+
+if(TARGET CURL::libcurl)
+ set(CURL_FOUND TRUE)
+
+ get_target_property(_curl_include_dirs CURL::libcurl INTERFACE_INCLUDE_DIRECTORIES)
+ 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)
+ 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}")
+
+ #For builds which rely on CURL_LIBRAR(Y/IES)
+ include(${CMAKE_ROOT}/Modules/SelectLibraryConfigurations.cmake)
+ select_library_configurations(CURL)
+
+ 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()
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
deleted file mode 100644
index 0bffdc6b4..000000000
--- a/ports/curlpp/vcpkg-cmake-wrapper.cmake
+++ /dev/null
@@ -1,35 +0,0 @@
-_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()
diff --git a/ports/pdal/PDALConfig.patch b/ports/pdal/PDALConfig.patch
index ea7681dc1..25e9bfcbe 100644
--- a/ports/pdal/PDALConfig.patch
+++ b/ports/pdal/PDALConfig.patch
@@ -2,12 +2,13 @@ diff --git a/PDALConfig.cmake.in b/PDALConfig.cmake.in
index a03ef142e..2d06a2937 100644
--- a/PDALConfig.cmake.in
+++ b/PDALConfig.cmake.in
-@@ -15,6 +15,8 @@ foreach(_dir @PDAL_CONFIG_LIBRARY_DIRS@)
+@@ -15,6 +15,9 @@ foreach(_dir @PDAL_CONFIG_LIBRARY_DIRS@)
list(APPEND PDAL_LIBRARY_DIRS ${_foo})
endforeach(_dir)
+include(CMakeFindDependencyMacro)
+find_dependency(GeoTIFF)
++find_dependency(CURL)
include("${CMAKE_CURRENT_LIST_DIR}/PDALTargets.cmake")
if (WIN32)