aboutsummaryrefslogtreecommitdiff
path: root/ports/cctz
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2017-10-14 05:38:43 -0700
committerRobert Schumacher <roschuma@microsoft.com>2017-10-14 05:38:43 -0700
commitab48a71c9af25041ab29a0d8e62a3cdf380638a5 (patch)
tree528226835c82448d70453c5dad90810317087719 /ports/cctz
parent58fd38c8200ce4c96ebe1aae3f85b324456b0ff7 (diff)
downloadvcpkg-ab48a71c9af25041ab29a0d8e62a3cdf380638a5.tar.gz
vcpkg-ab48a71c9af25041ab29a0d8e62a3cdf380638a5.zip
[cctz][abseil] Initial commit of cctz, improvement of abseil to build synch and time.
Diffstat (limited to 'ports/cctz')
-rw-r--r--ports/cctz/CMakeLists.txt36
-rw-r--r--ports/cctz/CONTROL3
-rw-r--r--ports/cctz/portfile.cmake24
3 files changed, 63 insertions, 0 deletions
diff --git a/ports/cctz/CMakeLists.txt b/ports/cctz/CMakeLists.txt
new file mode 100644
index 000000000..99322d05e
--- /dev/null
+++ b/ports/cctz/CMakeLists.txt
@@ -0,0 +1,36 @@
+cmake_minimum_required(VERSION 3.8)
+project(cctz CXX)
+
+set(CMAKE_DEBUG_POSTFIX d)
+set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
+
+if(CMAKE_BUILD_TYPE STREQUAL "Release")
+ option(INSTALL_HEADERS "Install header files" ON)
+else()
+ option(INSTALL_HEADERS "Install header files" OFF)
+endif()
+
+file(GLOB SOURCES src/*.cc)
+list(FILTER SOURCES EXCLUDE REGEX "_test.cc$|benchmarks|_tool.cc$")
+
+file(GLOB HEADERS include/cctz/*.h)
+
+add_library(cctz ${SOURCES})
+target_include_directories(cctz PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> $<INSTALL_INTERFACE:include>)
+
+if(INSTALL_HEADERS)
+ install(FILES ${HEADERS} DESTINATION "include/cctz")
+endif()
+
+install(TARGETS cctz EXPORT unofficial-cctz-targets
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
+)
+
+install(
+ EXPORT unofficial-cctz-targets
+ FILE unofficial-cctz-config.cmake
+ NAMESPACE unofficial::
+ DESTINATION share/unofficial-cctz
+)
diff --git a/ports/cctz/CONTROL b/ports/cctz/CONTROL
new file mode 100644
index 000000000..fb125fa13
--- /dev/null
+++ b/ports/cctz/CONTROL
@@ -0,0 +1,3 @@
+Source: cctz
+Version: v2.1
+Description: two libraries that cooperate with <chrono> to give C++ programmers all the necessary tools for computing with dates, times, and time zones in a simple and correct manner.
diff --git a/ports/cctz/portfile.cmake b/ports/cctz/portfile.cmake
new file mode 100644
index 000000000..11955b365
--- /dev/null
+++ b/ports/cctz/portfile.cmake
@@ -0,0 +1,24 @@
+include(vcpkg_common_functions)
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO google/cctz
+ REF v2.1
+ SHA512 b6531ce64fdd8581944457cdeff7f9ff9c00958af51ddb262c74e08fcc076466c59c7bef1ce7edccc9512a7f4cb204e04581d287c4a9a684057fe39421c3fbc6
+ HEAD_REF master
+)
+
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+)
+
+vcpkg_install_cmake()
+
+vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-cctz)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/cctz ${CURRENT_PACKAGES_DIR}/share/unofficial-cctz)
+
+vcpkg_copy_pdbs()
+
+file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/cctz RENAME copyright)