Merge branch 'add-cmake-packages' of https://github.com/esrf-bliss/slsDetectorPackage into esrf-bliss-add-cmake-packages

This commit is contained in:
2019-02-14 10:36:41 +01:00
9 changed files with 336 additions and 41 deletions

View File

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