mirror of
https://github.com/HowardHinnant/date.git
synced 2024-12-25 23:40:53 +08:00
parent
057b441ceb
commit
313189b0a8
@ -18,6 +18,7 @@
|
|||||||
cmake_minimum_required( VERSION 3.7 )
|
cmake_minimum_required( VERSION 3.7 )
|
||||||
|
|
||||||
project( date VERSION 3.0.0 )
|
project( date VERSION 3.0.0 )
|
||||||
|
set(ABI_VERSION 3) # used as SOVERSION, increment when ABI changes
|
||||||
|
|
||||||
include( GNUInstallDirs )
|
include( GNUInstallDirs )
|
||||||
|
|
||||||
@ -114,7 +115,7 @@ if( BUILD_TZ_LIB )
|
|||||||
PRIVATE
|
PRIVATE
|
||||||
src/ios.mm )
|
src/ios.mm )
|
||||||
endif()
|
endif()
|
||||||
add_library( date::tz ALIAS date-tz )
|
add_library( date::date-tz ALIAS date-tz )
|
||||||
target_link_libraries( date-tz PUBLIC date )
|
target_link_libraries( date-tz PUBLIC date )
|
||||||
target_include_directories( date-tz PUBLIC
|
target_include_directories( date-tz PUBLIC
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||||
@ -145,7 +146,7 @@ if( BUILD_TZ_LIB )
|
|||||||
POSITION_INDEPENDENT_CODE ON
|
POSITION_INDEPENDENT_CODE ON
|
||||||
PUBLIC_HEADER "${TZ_HEADERS}"
|
PUBLIC_HEADER "${TZ_HEADERS}"
|
||||||
VERSION "${PROJECT_VERSION}"
|
VERSION "${PROJECT_VERSION}"
|
||||||
SOVERSION "${PROJECT_VERSION}" )
|
SOVERSION "${ABI_VERSION}" )
|
||||||
if( NOT MSVC )
|
if( NOT MSVC )
|
||||||
find_package( Threads )
|
find_package( Threads )
|
||||||
target_link_libraries( date-tz PUBLIC Threads::Threads )
|
target_link_libraries( date-tz PUBLIC Threads::Threads )
|
||||||
@ -250,7 +251,7 @@ if( ENABLE_DATE_TESTING )
|
|||||||
${CMAKE_CXX_COMPILER}
|
${CMAKE_CXX_COMPILER}
|
||||||
-std=c++14
|
-std=c++14
|
||||||
-L${CMAKE_BINARY_DIR}/
|
-L${CMAKE_BINARY_DIR}/
|
||||||
-ltz
|
-ldate-tz
|
||||||
-I${PROJECT_SOURCE_DIR}/include
|
-I${PROJECT_SOURCE_DIR}/include
|
||||||
-I${PROJECT_SOURCE_DIR}/include/date
|
-I${PROJECT_SOURCE_DIR}/include/date
|
||||||
-o ${BIN_NAME}
|
-o ${BIN_NAME}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
include( CMakeFindDependencyMacro )
|
include( CMakeFindDependencyMacro )
|
||||||
include( "${CMAKE_CURRENT_LIST_DIR}/dateTargets.cmake" )
|
include( "${CMAKE_CURRENT_LIST_DIR}/dateTargets.cmake" )
|
||||||
if( NOT MSVC AND TARGET date::tz )
|
if( NOT MSVC AND TARGET date::date-tz )
|
||||||
find_dependency( Threads REQUIRED)
|
find_dependency( Threads REQUIRED)
|
||||||
get_target_property( _tzill date::tz INTERFACE_LINK_LIBRARIES )
|
get_target_property( _tzill date::date-tz INTERFACE_LINK_LIBRARIES )
|
||||||
if( _tzill AND "${_tzill}" MATCHES "libcurl" )
|
if( _tzill AND "${_tzill}" MATCHES "libcurl" )
|
||||||
find_dependency( CURL )
|
find_dependency( CURL )
|
||||||
endif( )
|
endif( )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user