From 9d6245dfba1153421ee427c189f1286353ebfc1f Mon Sep 17 00:00:00 2001 From: Pawel Wodkowski Date: Mon, 13 Feb 2023 18:10:30 +0100 Subject: [PATCH] Add COMPONENT to install targets dh-cmake is using components to aid DEB package creation. --- CMakeLists.txt | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6a00c64a..5aa76292 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -151,21 +151,25 @@ if (SCN_INSTALL) install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include/" - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} + COMPONENT scnlib_Development) install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/src/" - DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/scn/detail") + DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/scn/detail" + COMPONENT scnlib_Development) install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/README.md" "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE" - DESTINATION ${CMAKE_INSTALL_DATADIR}/scn) + DESTINATION ${CMAKE_INSTALL_DATADIR}/scn + COMPONENT scnlib_Development) install(FILES "${CMAKE_CURRENT_BINARY_DIR}/scnConfigVersion.cmake" "${CMAKE_CURRENT_BINARY_DIR}/scnConfig.cmake" - DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/scn") + DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/scn" + COMPONENT scnlib_Development) export(TARGETS ${SCN_EXPORT_TARGETS_LIST} NAMESPACE scn @@ -174,12 +178,14 @@ if (SCN_INSTALL) export(PACKAGE scn) install(TARGETS ${SCN_EXPORT_TARGETS_LIST} + COMPONENT scnlib_Development EXPORT scnTargets ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) install(EXPORT scnTargets + COMPONENT scnlib_Development NAMESPACE scn:: DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/scn") endif ()