2017-08-16 03:47:23 +08:00
|
|
|
include(vcpkg_common_functions)
|
|
|
|
|
2017-09-01 07:06:18 +08:00
|
|
|
message(WARNING
|
|
|
|
"You will need to also install http://unicode.org/repos/cldr/trunk/common/supplemental/windowsZones.xml into your install location"
|
|
|
|
"See https://howardhinnant.github.io/date/tz.html"
|
|
|
|
)
|
|
|
|
|
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
|
2018-01-11 13:46:08 +08:00
|
|
|
REF v2.4
|
|
|
|
SHA512 01bcc021ebf9ca0ac88c797896a291ff81834e7fae37323ad20881d3a172963c04d3c7bea0dd37cd945b756ab7f70f0a02edb18a085bf9abf8d8f10056f73f3c
|
2017-09-01 07:06:18 +08:00
|
|
|
HEAD_REF master
|
2017-08-16 03:47:23 +08:00
|
|
|
)
|
|
|
|
|
2018-02-12 17:50:04 +08:00
|
|
|
vcpkg_apply_patches(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix-date.patch
|
|
|
|
)
|
|
|
|
|
2017-08-16 03:47:23 +08:00
|
|
|
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
|
|
|
|
|
|
|
vcpkg_configure_cmake(
|
2017-09-01 07:06:18 +08:00
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
PREFER_NINJA
|
|
|
|
OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON
|
2017-08-16 03:47:23 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
|
2017-09-01 07:06:18 +08:00
|
|
|
vcpkg_copy_pdbs()
|
2017-08-16 03:47:23 +08:00
|
|
|
|
2018-01-12 10:50:19 +08:00
|
|
|
set(HEADER "${CURRENT_PACKAGES_DIR}/include/date/tz.h")
|
|
|
|
file(READ "${HEADER}" _contents)
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
|
|
|
string(REPLACE "ifdef DATE_BUILD_DLL" "if 1" _contents "${_contents}")
|
|
|
|
endif()
|
|
|
|
file(WRITE "${HEADER}" "${_contents}")
|
|
|
|
|
2017-09-01 07:06:18 +08:00
|
|
|
file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/date RENAME copyright)
|