From 361352673d3d564d600f89d5813c21a0a1e62562 Mon Sep 17 00:00:00 2001 From: Partha Biswas Date: Thu, 17 Aug 2023 11:10:29 +0000 Subject: [PATCH] Include additional headers during cmake install --- CMakeLists.txt | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9b4bb20..a430a23 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -75,15 +75,23 @@ 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: - $ - $ - $ - $ + $$/date/solar_hijri.h + $$/date/islamic.h + $$/date/iso_week.h + $$/date/julian.h ) + +set(TARGET_HEADERS + include/date/date.h + include/date/solar_hijri.h + include/date/islamic.h + include/date/iso_week.h + include/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 "${TARGET_HEADERS}" ) endif () # These used to be set with generator expressions, @@ -186,7 +194,7 @@ if( ENABLE_DATE_INSTALL ) export( TARGETS date NAMESPACE date:: FILE dateTargets.cmake ) if (CMAKE_VERSION VERSION_LESS 3.15) install( - FILES include/date/date.h + FILES ${TARGET_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/date ) endif ()