Add generation and install of CMake packages

This commit is contained in:
Samuel Debionne
2019-02-11 13:56:48 +01:00
parent 01e3cb8d5e
commit c064dc84ae
9 changed files with 334 additions and 39 deletions

View File

@ -19,15 +19,16 @@ add_library(slsDetectorShared SHARED
${SOURCES}
${HEADERS}
)
target_include_directories(slsDetectorShared PUBLIC
multiSlsDetector
sharedMemory
slsDetector
target_include_directories(slsDetectorShared PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/multiSlsDetector>"
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/sharedMemory>"
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/slsDetector>"
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>"
)
target_link_libraries(slsDetectorShared
target_link_libraries(slsDetectorShared PUBLIC
slsSupportLib
zmq
zmq
)
set(PUBLICHEADERS
@ -57,7 +58,8 @@ endif()
install(TARGETS slsDetectorShared
EXPORT "${TARGETS_EXPORT_NAME}"
LIBRARY DESTINATION lib
PUBLIC_HEADER DESTINATION include
ARCHIVE DESTINATION lib
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
)