diff options
| author | atkawa7 <atkawa7@yahoo.com> | 2017-08-15 12:47:23 -0700 |
|---|---|---|
| committer | atkawa7 <atkawa7@yahoo.com> | 2017-08-15 12:47:23 -0700 |
| commit | 675323c45c0ffb47c62adb2d3ac098bda5cc5d1d (patch) | |
| tree | d8617eb2a2d282fd64cf48dba6028b8277d1301b | |
| parent | cd7f4cccffd915edc2d4b625ff32dea970ec073f (diff) | |
| download | vcpkg-675323c45c0ffb47c62adb2d3ac098bda5cc5d1d.tar.gz vcpkg-675323c45c0ffb47c62adb2d3ac098bda5cc5d1d.zip | |
[date] init port
| -rw-r--r-- | ports/date/CMakeLists.txt | 25 | ||||
| -rw-r--r-- | ports/date/CONTROL | 3 | ||||
| -rw-r--r-- | ports/date/portfile.cmake | 22 |
3 files changed, 50 insertions, 0 deletions
diff --git a/ports/date/CMakeLists.txt b/ports/date/CMakeLists.txt new file mode 100644 index 000000000..2f4771db1 --- /dev/null +++ b/ports/date/CMakeLists.txt @@ -0,0 +1,25 @@ +cmake_minimum_required(VERSION 3.5.1) +project(tz CXX) + +if(MSVC) + add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS) +endif() + +if(BUILD_SHARED_LIBS) + set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) +endif() + +include_directories(${PROJECT_SRC_DIR}) + +add_library(tz tz.cpp) + +install( + TARGETS tz + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES date.h tz.h julian.h iso_week.h islamic.h DESTINATION include) +endif() diff --git a/ports/date/CONTROL b/ports/date/CONTROL new file mode 100644 index 000000000..8eab618c2 --- /dev/null +++ b/ports/date/CONTROL @@ -0,0 +1,3 @@ +Source: date +Version: 2.2 +Description: A date and time library based on the C++11/14/17 <chrono> header diff --git a/ports/date/portfile.cmake b/ports/date/portfile.cmake new file mode 100644 index 000000000..ef49b7d0a --- /dev/null +++ b/ports/date/portfile.cmake @@ -0,0 +1,22 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO HowardHinnant/date + REF v2.2 + SHA512 6889152acf1d0cc551d572eccaabd9f00ebecdb5723356949db2f1bd5f4b13e1ffad889082451cfb28254968a576b983116bc1a77e060426c9f33ca7774822cb + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON +) + +vcpkg_install_cmake() + +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/date RENAME copyright) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) |
