build: cmake install targets
This commit is contained in:
parent
eaa5f3ada3
commit
6f74ce1cf4
2 changed files with 13 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
6
include/CMakeLists.txt
Normal file
6
include/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
# header-only library
|
||||
add_library(indentlog INTERFACE)
|
||||
target_include_directories(indentlog INTERFACE
|
||||
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
|
||||
$<INSTALL_INTERFACE:include>
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue