build: install the library and headers

This commit is contained in:
Danny Robson 2019-06-18 11:26:03 +10:00
parent 7dcba62047
commit b7ebf577bf

View File

@ -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)