From 6f74ce1cf42f7d23a5450a9f94808ef13b82d43d Mon Sep 17 00:00:00 2001 From: Roland Conybeare Date: Mon, 18 Sep 2023 17:51:28 -0400 Subject: [PATCH] build: cmake install targets --- CMakeLists.txt | 7 +++++++ include/CMakeLists.txt | 6 ++++++ 2 files changed, 13 insertions(+) create mode 100644 include/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 38939895..aeeda3ed 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,4 +6,11 @@ enable_testing() include(cmake/nestlog.cmake) +add_subdirectory(include) add_subdirectory(example) + +# this doesn't work in include/CMakeLists.txt +install(TARGETS indentlog DESTINATION include) + +set(CMAKE_INSTALL_PREFIX /home/roland/local) +set(CMAKE_INSTALL_RPATH /home/roland/local/lib) diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt new file mode 100644 index 00000000..72fcb50d --- /dev/null +++ b/include/CMakeLists.txt @@ -0,0 +1,6 @@ +# header-only library +add_library(indentlog INTERFACE) +target_include_directories(indentlog INTERFACE + $ + $ + )