mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-13 13:27:14 +02:00
Add generation and install of CMake packages
This commit is contained in:
@ -37,7 +37,10 @@ add_library(slsSupportLib SHARED
|
||||
${HEADERS}
|
||||
)
|
||||
|
||||
target_include_directories(slsSupportLib PUBLIC include)
|
||||
target_include_directories(slsSupportLib PUBLIC
|
||||
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
|
||||
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>"
|
||||
)
|
||||
|
||||
set_target_properties(slsSupportLib PROPERTIES
|
||||
LIBRARY_OUTPUT_NAME SlsSupport
|
||||
@ -49,8 +52,10 @@ if (USE_TESTS)
|
||||
add_subdirectory(tests)
|
||||
endif(USE_TESTS)
|
||||
|
||||
# Install the library
|
||||
install(TARGETS slsSupportLib
|
||||
LIBRARY DESTINATION lib
|
||||
PUBLIC_HEADER DESTINATION include
|
||||
ARCHIVE DESTINATION lib
|
||||
EXPORT "${TARGETS_EXPORT_NAME}"
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
||||
)
|
||||
|
Reference in New Issue
Block a user