vcpkg/ports/date/portfile.cmake

48 lines
1.6 KiB
CMake
Raw Normal View History

2020-06-24 04:37:41 +08:00
if(VCPKG_TARGET_IS_WINDOWS)
message(WARNING
"You will need to also install https://raw.githubusercontent.com/unicode-org/cldr/master/common/supplemental/windowsZones.xml into your install location.\n"
"See https://howardhinnant.github.io/date/tz.html"
)
endif()
2017-09-01 07:06:18 +08:00
2017-08-16 03:47:23 +08:00
vcpkg_from_github(
2017-09-01 07:06:18 +08:00
OUT_SOURCE_PATH SOURCE_PATH
REPO HowardHinnant/date
2020-06-24 04:37:41 +08:00
REF cac99da8dc88be719a728dc1b597b0ac307c1800 #3.0.0
SHA512 07bac40c9d92ed92f05ab71b07c203fc341cd35999f1eab16d584bf77ff69e2cdc106931b2faf0dcfc5a311ee55e8445a81fd97c62f4672957b6aac1b24a08fd
2017-09-01 07:06:18 +08:00
HEAD_REF master
PATCHES
2020-06-24 04:37:41 +08:00
0001-fix-uwp.patch
0002-fix-cmake-3.14.patch
)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
INVERTED_FEATURES
remote-api USE_SYSTEM_TZ_DB
2017-08-16 03:47:23 +08:00
)
2017-08-16 03:47:23 +08:00
vcpkg_configure_cmake(
2017-09-01 07:06:18 +08:00
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
2020-06-24 04:37:41 +08:00
${FEATURE_OPTIONS}
-DBUILD_TZ_LIB=ON
2017-08-16 03:47:23 +08:00
)
vcpkg_install_cmake()
if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
vcpkg_fixup_cmake_targets(CONFIG_PATH CMake TARGET_PATH share/date)
else()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/date TARGET_PATH share/date)
endif()
2017-09-01 07:06:18 +08:00
vcpkg_copy_pdbs()
2017-08-16 03:47:23 +08:00
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
2017-09-01 07:06:18 +08:00
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)