vcpkg/ports/date/portfile.cmake

44 lines
1.1 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
REF v3.0.1
SHA512 6bdc7cba821d66e17a559250cc0ce0095808e9db81cec9e16eaa4c31abdfa705299c67b72016d9b06b302bc306d063e83a374eb00728071b83a5ad650d59034f
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
)
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-16 03:47:23 +08:00
)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
${FEATURE_OPTIONS}
-DBUILD_TZ_LIB=ON
2017-08-16 03:47:23 +08:00
)
vcpkg_cmake_install()
2017-08-16 03:47:23 +08:00
if(VCPKG_TARGET_IS_WINDOWS)
vcpkg_cmake_config_fixup(CONFIG_PATH CMake)
else()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/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")
file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)