vcpkg/ports/date/CMakeLists.txt

31 lines
607 B
CMake
Raw Normal View History

2017-08-16 03:47:23 +08:00
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()
2017-09-01 07:06:18 +08:00
add_definitions(-DNOMINMAX)
2017-08-16 03:47:23 +08:00
2017-09-01 07:06:18 +08:00
include_directories(".")
2017-08-16 03:47:23 +08:00
add_library(tz tz.cpp)
2017-09-01 07:06:18 +08:00
if(BUILD_SHARED_LIBS)
target_compile_definitions(tz PRIVATE -DDATE_BUILD_DLL)
else()
target_compile_definitions(tz PRIVATE -DDATE_BUILD_LIB)
endif()
2017-08-16 03:47:23 +08:00
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()