vcpkg/ports/date/portfile.cmake

45 lines
1.3 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-08-31 16:06:18 -07:00
2017-08-15 12:47:23 -07:00
vcpkg_from_github(
2017-08-31 16:06:18 -07: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-08-31 16:06:18 -07:00
HEAD_REF master
PATCHES
2020-06-24 04:37:41 +08:00
0001-fix-uwp.patch
0002-fix-cmake-3.14.patch
0003-find-dependency-pthread.patch
2020-06-24 04:37:41 +08:00
)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
INVERTED_FEATURES
remote-api USE_SYSTEM_TZ_DB
2017-08-15 12:47:23 -07:00
)
2017-08-15 12:47:23 -07:00
vcpkg_configure_cmake(
2017-08-31 16:06:18 -07:00
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
2020-06-24 04:37:41 +08:00
${FEATURE_OPTIONS}
-DBUILD_TZ_LIB=ON
2017-08-15 12:47:23 -07:00
)
vcpkg_install_cmake()
if(VCPKG_TARGET_IS_WINDOWS)
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-08-31 16:06:18 -07:00
vcpkg_copy_pdbs()
2017-08-15 12:47:23 -07:00
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/date RENAME copyright)