diff --git a/CMakeLists.txt b/CMakeLists.txt index ebe2bce..d0baf60 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,6 +18,7 @@ cmake_minimum_required( VERSION 3.7 ) project( date VERSION 3.0.0 ) +set(ABI_VERSION 3) # used as SOVERSION, increment when ABI changes include( GNUInstallDirs ) @@ -114,7 +115,7 @@ if( BUILD_TZ_LIB ) PRIVATE src/ios.mm ) endif() - add_library( date::tz ALIAS date-tz ) + add_library( date::date-tz ALIAS date-tz ) target_link_libraries( date-tz PUBLIC date ) target_include_directories( date-tz PUBLIC $ @@ -145,7 +146,7 @@ if( BUILD_TZ_LIB ) POSITION_INDEPENDENT_CODE ON PUBLIC_HEADER "${TZ_HEADERS}" VERSION "${PROJECT_VERSION}" - SOVERSION "${PROJECT_VERSION}" ) + SOVERSION "${ABI_VERSION}" ) if( NOT MSVC ) find_package( Threads ) target_link_libraries( date-tz PUBLIC Threads::Threads ) @@ -250,7 +251,7 @@ if( ENABLE_DATE_TESTING ) ${CMAKE_CXX_COMPILER} -std=c++14 -L${CMAKE_BINARY_DIR}/ - -ltz + -ldate-tz -I${PROJECT_SOURCE_DIR}/include -I${PROJECT_SOURCE_DIR}/include/date -o ${BIN_NAME} diff --git a/cmake/dateConfig.cmake b/cmake/dateConfig.cmake index 20f86e8..2198ad1 100644 --- a/cmake/dateConfig.cmake +++ b/cmake/dateConfig.cmake @@ -1,8 +1,8 @@ include( CMakeFindDependencyMacro ) 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) - 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" ) find_dependency( CURL ) endif( )