aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>2020-08-07 11:44:42 -0700
committerGitHub <noreply@github.com>2020-08-07 11:44:42 -0700
commit6718a4a703607ce42cd587353b1151688e7ade0b (patch)
tree8a1a1bd9dc5c0a0aabace509f1cb781099da79d9
parent5b35ffe65b6b4878090f63a429e58a06c7771c1d (diff)
downloadvcpkg-6718a4a703607ce42cd587353b1151688e7ade0b.tar.gz
vcpkg-6718a4a703607ce42cd587353b1151688e7ade0b.zip
[date] Fix config.cmake and usage (#12739)
* [date] Fix config.cmake and usage * Correct fix * Remove wrapper and usage
-rw-r--r--ports/date/0003-find-dependency-pthread.patch15
-rw-r--r--ports/date/CONTROL1
-rw-r--r--ports/date/portfile.cmake7
-rw-r--r--ports/date/usage4
-rw-r--r--ports/date/vcpkg-cmake-wrapper.cmake11
5 files changed, 18 insertions, 20 deletions
diff --git a/ports/date/0003-find-dependency-pthread.patch b/ports/date/0003-find-dependency-pthread.patch
new file mode 100644
index 000000000..72c6c765a
--- /dev/null
+++ b/ports/date/0003-find-dependency-pthread.patch
@@ -0,0 +1,15 @@
+diff --git a/cmake/dateConfig.cmake b/cmake/dateConfig.cmake
+index 20f86e8..2198ad1 100644
+--- a/cmake/dateConfig.cmake
++++ b/cmake/dateConfig.cmake
+@@ -1,8 +1,8 @@
+ include( CMakeFindDependencyMacro )
+ include( "${CMAKE_CURRENT_LIST_DIR}/dateTargets.cmake" )
+-if( NOT MSVC AND TARGET date::tz )
++if( NOT MSVC AND TARGET date::date-tz )
+ find_dependency( Threads REQUIRED)
+- get_target_property( _tzill date::tz INTERFACE_LINK_LIBRARIES )
++ get_target_property( _tzill date::date-tz INTERFACE_LINK_LIBRARIES )
+ if( _tzill AND "${_tzill}" MATCHES "libcurl" )
+ find_dependency( CURL )
+ endif( )
diff --git a/ports/date/CONTROL b/ports/date/CONTROL
index c912bd283..b44b024cd 100644
--- a/ports/date/CONTROL
+++ b/ports/date/CONTROL
@@ -1,5 +1,6 @@
Source: date
Version: 3.0.0
+Port-Version: 1
Homepage: https://github.com/HowardHinnant/date
Description: A date and time library based on the C++17 <chrono> header
diff --git a/ports/date/portfile.cmake b/ports/date/portfile.cmake
index 3fd9121c4..4dd5a40eb 100644
--- a/ports/date/portfile.cmake
+++ b/ports/date/portfile.cmake
@@ -14,6 +14,7 @@ vcpkg_from_github(
PATCHES
0001-fix-uwp.patch
0002-fix-cmake-3.14.patch
+ 0003-find-dependency-pthread.patch
)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
INVERTED_FEATURES
@@ -39,9 +40,5 @@ endif()
vcpkg_copy_pdbs()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
-file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/date RENAME copyright)
-file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/date)
-# Remove the wrapper when backwards compatibility when the unofficial::date::date and unofficial::date::tz
-# targets are no longer required.
-file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/date)
+file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/date RENAME copyright)
diff --git a/ports/date/usage b/ports/date/usage
deleted file mode 100644
index 82f42f7f2..000000000
--- a/ports/date/usage
+++ /dev/null
@@ -1,4 +0,0 @@
-The package date provides CMake targets:
-
- find_package(date CONFIG REQUIRED)
- target_link_libraries(main PRIVATE date::date date::tz)
diff --git a/ports/date/vcpkg-cmake-wrapper.cmake b/ports/date/vcpkg-cmake-wrapper.cmake
deleted file mode 100644
index 317c49b8c..000000000
--- a/ports/date/vcpkg-cmake-wrapper.cmake
+++ /dev/null
@@ -1,11 +0,0 @@
-_find_package(${ARGS})
-
-if(NOT TARGET unofficial::date::date AND TARGET date::date)
- add_library(unofficial::date::date INTERFACE IMPORTED)
- target_link_libraries(unofficial::date::date INTERFACE date::date)
-endif()
-
-if(NOT TARGET unofficial::date::tz AND TARGET date::tz)
- add_library(unofficial::date::tz INTERFACE IMPORTED)
- target_link_libraries(unofficial::date::tz INTERFACE date::tz)
-endif()