diff options
author | Taylor C. Richberger <taywee@gmx.com> | 2019-05-01 14:16:53 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-01 14:16:53 -0600 |
commit | 623e52cb128cfc572ad4e79de8d5f8861d13d017 (patch) | |
tree | 99790af3605cb0ca18bb362f3f646ba2ce35a37f | |
parent | turn ptrdiff_t into std::ptrdiff_t (diff) | |
parent | install CMake target taywee::args (diff) | |
download | args.hxx-623e52cb128cfc572ad4e79de8d5f8861d13d017.tar.xz |
Merge pull request #73 from zhihaoy/cmake-targets
install CMake target taywee::args
-rw-r--r-- | CMakeLists.txt | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index c59cfa9..6f63af6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,7 +26,16 @@ option(ARGS_BUILD_EXAMPLE "Build example" ON) option(ARGS_BUILD_UNITTESTS "Build unittests" ON) add_library(args INTERFACE) -target_include_directories(args INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}") +target_include_directories(args INTERFACE + $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}> + $<INSTALL_INTERFACE:include>) + +install(FILES args.hxx DESTINATION include) +install(TARGETS args EXPORT args-targets) +install(EXPORT args-targets + FILE args-config.cmake + NAMESPACE taywee:: + DESTINATION lib/cmake/args) if (ARGS_BUILD_EXAMPLE) add_executable(gitlike examples/gitlike.cxx) |