From b7ebf577bf0ac7ff1582ba4241eaf2ebcbab1245 Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Tue, 18 Jun 2019 11:26:03 +1000 Subject: [PATCH] build: install the library and headers --- CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index a9ec57b6..d06c65e7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -540,8 +540,15 @@ DEPENDS ############################################################################### target_sources(cruft PRIVATE ${UTIL_FILES}) add_library(cruft-util ALIAS cruft) + target_include_directories(cruft PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}") +install (TARGETS cruft LIBRARY) + +set (headers ${UTIL_FILES}) +list (FILTER headers INCLUDE REGEX "\\.hpp$") +install (FILES ${headers} DESTINATION "include/cruft/util") + search_libs (SHM_LIBS shm_open rt) search_libs (DL_LIBS dlopen dl)