From 3286289bf699d37a85926ea62b0edd6901c85f40 Mon Sep 17 00:00:00 2001 From: Olivier Le Doeuff Date: Mon, 26 Sep 2022 16:38:54 +0200 Subject: [PATCH] build: use standard `CMAKE_INSTALL_INCLUDEDIR` for header install folder. This gives user control over which folder header should be installed to instead of using hardcoded value `include/`. Variable `CMAKE_INSTALL_INCLUDEDIR` is provided after a call to `include(GNUInstallDirs)` More info can be found about usage in docs: https://cmake.org/cmake/help/latest/command/install.html --- CMakeLists.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 12f0e46..d81ed81 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -68,10 +68,10 @@ add_library( date INTERFACE ) add_library( date::date ALIAS date ) target_include_directories( date INTERFACE $ - $ ) + $ ) # adding header sources just helps IDEs target_sources( date INTERFACE - $$/date/date.h + $$/date/date.h # the rest of these are not currently part of the public interface of the library: $ $ @@ -111,14 +111,14 @@ if( BUILD_TZ_LIB ) add_library( date-tz ) target_sources( date-tz PUBLIC - $$/date/tz.h + $$/date/tz.h PRIVATE include/date/tz_private.h src/tz.cpp ) if ( IOS ) target_sources( date-tz PUBLIC - $$/date/ios.h + $$/date/ios.h PRIVATE src/ios.mm ) endif() @@ -126,7 +126,7 @@ if( BUILD_TZ_LIB ) target_link_libraries( date-tz PUBLIC date ) target_include_directories( date-tz PUBLIC $ - $ ) + $ ) if ( USE_SYSTEM_TZ_DB OR MANUAL_TZ_DB ) target_compile_definitions( date-tz PRIVATE AUTO_DOWNLOAD=0 HAS_REMOTE_API=0 )