From 9178193ad2493ceec9fffc9ad5849e15fe7e42c0 Mon Sep 17 00:00:00 2001 From: ajneu Date: Fri, 1 Dec 2017 21:15:32 +0100 Subject: [PATCH] cmake: date as INTERFACE target, to enable automatic include_directory (for cases where just date.h, but not "tz.h and its lib" are needed) --- CMakeLists.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index ba1b909..8aefbcc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -72,6 +72,19 @@ target_include_directories(tz PUBLIC > ) +add_library(date INTERFACE) # an interface (not a library), to enable automatic include_directory (for when just date.h, but not "tz.h and its lib" are needed) + +# add include folders to the INTERFACE and targets that consume it +target_include_directories(date INTERFACE + $ + $ +) + + install( TARGETS tz DESTINATION lib ) install( DIRECTORY ${HEADER_FOLDER}/ DESTINATION include/ )