mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 10:21:07 +08:00
[date] init port
This commit is contained in:
parent
cd7f4cccff
commit
675323c45c
25
ports/date/CMakeLists.txt
Normal file
25
ports/date/CMakeLists.txt
Normal file
@ -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()
|
3
ports/date/CONTROL
Normal file
3
ports/date/CONTROL
Normal file
@ -0,0 +1,3 @@
|
||||
Source: date
|
||||
Version: 2.2
|
||||
Description: A date and time library based on the C++11/14/17 <chrono> header
|
22
ports/date/portfile.cmake
Normal file
22
ports/date/portfile.cmake
Normal file
@ -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)
|
Loading…
x
Reference in New Issue
Block a user