diff --git a/CMakeLists.txt b/CMakeLists.txt index f9f7ea81..df5026c5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -67,15 +67,20 @@ target_include_directories( date INTERFACE # adding header sources just helps IDEs target_sources( date INTERFACE $$/date/date.h - # the rest of these are not currently part of the public interface of the library: - $ - $ - $ - $ ) + +add_library(extra INTERFACE) +add_library(date::extra ALIAS extra) +target_sources(extra INTERFACE + $$/date/solar_hijri.h + $$/date/islamic.h + $$/date/julian.h +) + if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.15) # public headers will get installed: - set_target_properties( date PROPERTIES PUBLIC_HEADER include/date/date.h ) + set_target_properties( date PROPERTIES PUBLIC_HEADER include/date/date.h) + set_target_properties( extra PROPERTIES PUBLIC_HEADER "include/date/islamic.h;include/date/solar_hijri.h;include/date/julian.h") endif () # These used to be set with generator expressions, @@ -166,10 +171,10 @@ if( BUILD_TZ_LIB ) PUBLIC_HEADER "${TZ_HEADERS}" VERSION "${PROJECT_VERSION}" SOVERSION "${ABI_VERSION}" ) - if( NOT MSVC ) - find_package( Threads ) - target_link_libraries( date-tz PUBLIC Threads::Threads ) - endif( ) + + find_package( Threads ) + target_link_libraries( date-tz PUBLIC Threads::Threads ) + if( NOT USE_SYSTEM_TZ_DB AND NOT MANUAL_TZ_DB ) find_package( CURL REQUIRED ) target_include_directories( date-tz SYSTEM PRIVATE ${CURL_INCLUDE_DIRS} ) @@ -192,6 +197,11 @@ install( TARGETS date PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/date ) export( TARGETS date NAMESPACE date:: FILE dateTargets.cmake ) +install( TARGETS extra + EXPORT dateTargets + PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/date) +export(TARGETS extra NAMESPACE date:: APPEND FILE dateTargets.cmake) + install( TARGETS iso_week EXPORT dateTargets PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/date ) @@ -225,9 +235,6 @@ install( EXPORT dateTargets FILE dateTargets.cmake NAMESPACE date:: DESTINATION ${CONFIG_LOC} ) -install ( - FILES cmake/dateConfig.cmake "${version_config}" - DESTINATION ${CONFIG_LOC}) configure_file(cmake/dateConfig.cmake.in dateConfig.cmake @ONLY) install(FILES "${CMAKE_CURRENT_BINARY_DIR}/dateConfig.cmake"