From 9dbaab69a63526bf3c3a0b7ad0eea6330938a529 Mon Sep 17 00:00:00 2001 From: Lucas Russo Date: Mon, 5 Apr 2021 16:30:39 -0300 Subject: [PATCH] various: fix setting CPACK variables only when building respective package --- .../AddExternalProjectPciedriver.cmake | 96 +++++++++-------- examples/CMakeLists.txt | 99 +++++++++-------- libs/acqclient/CMakeLists.txt | 101 +++++++++--------- libs/bpmclient/CMakeLists.txt | 101 +++++++++--------- libs/convc/CMakeLists.txt | 101 +++++++++--------- libs/disptable/CMakeLists.txt | 101 +++++++++--------- libs/errhand/CMakeLists.txt | 101 +++++++++--------- libs/hutils/CMakeLists.txt | 99 +++++++++-------- libs/llio/CMakeLists.txt | 101 +++++++++--------- libs/sdbfs/CMakeLists.txt | 99 +++++++++-------- libs/sdbutils/CMakeLists.txt | 101 +++++++++--------- src/client/CMakeLists.txt | 101 +++++++++--------- 12 files changed, 633 insertions(+), 568 deletions(-) diff --git a/cmake/Modules/AddExternalProjectPciedriver.cmake b/cmake/Modules/AddExternalProjectPciedriver.cmake index fe7d7b63..8da24339 100644 --- a/cmake/Modules/AddExternalProjectPciedriver.cmake +++ b/cmake/Modules/AddExternalProjectPciedriver.cmake @@ -226,28 +226,16 @@ endif() option(ENABLE_CPACK "Enables cpack rules" ON) if(ENABLE_CPACK) - if(${CMAKE_BUILD_TYPE} MATCHES "Debug") - set(CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY TRUE) - set(CMAKE_INSTALL_DEBUG_LIBRARIES TRUE) - set(CMAKE_INSTALL_UCRT_LIBRARIES TRUE) - endif() - - include(InstallRequiredSystemLibraries) - # set architecture as detected by TargetArch module set(arch_name ${ARCH}) - list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_BINARY_DIR}) - set(pciedriver_DISTRO_VERSION "" CACHE STRING "pciedriver distribution version") string(APPEND pciedriver_VERSION "${pciedriver_DISTRO_VERSION}") - set(CPACK_GENERATOR "DEB") - set(CPACK_DEB_COMPONENT_INSTALL ON) - set(CPACK_DEBIAN_ENABLE_COMPONENT_DEPENDS ON) - set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS_POLICY ">=") - set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS ON) - set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS OFF) + list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_BINARY_DIR}) + + # Generate debuginfo package + set(CPACK_DEBIAN_PCIEDRIVER_DEBUGINFO_PACKAGE ON) set(CPACK_DEBIAN_PCIEDRIVER_PACKAGE_DEPENDS "dkms") set(CPACK_DEBIAN_PCIEDRIVER_PACKAGE_CONTROL_EXTRA "${BINARY_DIR}/postinst;${BINARY_DIR}/prerm" @@ -257,48 +245,70 @@ if(ENABLE_CPACK) "${CPACK_DEBIAN_PCIEDRIVER_PACKAGE_NAME}_${pciedriver_VERSION}_${arch_name}.deb" ) - set(CPACK_RPM_COMPONENT_INSTALL ON) - set(CPACK_RPM_PACKAGE_AUTOREQ no) - set(CPACK_RPM_PACKAGE_AUTOPROV yes) set(CPACK_RPM_PCIEDRIVER_PACKAGE_REQUIRE "dkms") - set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION - /lib - /usr/etc - /etc/systemd - /lib/systemd - /etc/systemd/system - /lib/systemd/system - /etc/udev - /etc/udev/rules.d - ) set(CPACK_RPM_PCIEDRIVER_POST_INSTALL_SCRIPT_FILE "${BINARY_DIR}/postinst") set(CPACK_RPM_PCIEDRIVER_PRE_UNINSTALL_SCRIPT_FILE "${BINARY_DIR}/prerm") set(CPACK_RPM_PCIEDRIVER_PACKAGE_NAME "pcieDriver") set(CPACK_RPM_PCIEDRIVER_FILE_NAME "${CPACK_RPM_PCIEDRIVER_PACKAGE_NAME}_${pciedriver_VERSION}_${arch_name}.rpm" ) + # Generate debuginfo package + set(CPACK_RPM_PCIEDRIVER_DEBUGINFO_PACKAGE ON) + set(CPACK_RPM_PCIEDRIVER_BUILD_SOURCE_DIRS_PREFIX "/usr/src/debug/${CPACK_RPM_PCIEDRIVER_PACKAGE_NAME}-${pciedriver_VERSION}") set(CPACK_COMPONENT_PCIEDRIVER_DESCRIPTION "pcieDriver library/driver") - set(CPACK_PACKAGE_VENDOR "LNLS") - set(CPACK_PACKAGE_CONTACT "Lucas Russo ") + # This is always true as this is included in the main + # CMakeLists.txt. Kept here for reference, as main CMakeLists.txt + # already includes CPack # if(CMAKE_CURRENT_BINARY_DIR STREQUAL CMAKE_BINARY_DIR) - # include(CPack) + # if(${CMAKE_BUILD_TYPE} MATCHES "Debug") + # set(CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY TRUE) + # set(CMAKE_INSTALL_DEBUG_LIBRARIES TRUE) + # set(CMAKE_INSTALL_UCRT_LIBRARIES TRUE) + # endif() # - # cpack_add_component_group(PciedriverAll - # DISPLAY_NAME "pcieDriver drivers, headers and libraries" - # ) + # include(InstallRequiredSystemLibraries) # - # cpack_add_component(Pciedriver - # DISPLAY_NAME "pcieDriver drivers, headers and libraries" - # GROUP PciedriverAll - # INSTALL_TYPES FullDriver - # ) + # set(CPACK_GENERATOR "DEB") # - # cpack_add_install_type(FullDriver - # DISPLAY_NAME "Full drivers, headers and libraries" - # ) + # set(CPACK_DEB_COMPONENT_INSTALL ON) + # set(CPACK_DEBIAN_ENABLE_COMPONENT_DEPENDS ON) + # set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS_POLICY ">=") + # set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS ON) + # set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) + # set(CPACK_RPM_COMPONENT_INSTALL ON) + # set(CPACK_RPM_PACKAGE_AUTOREQ no) + # set(CPACK_RPM_PACKAGE_AUTOPROV yes) + # set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION + # /lib + # /usr/etc + # /etc/systemd + # /lib/systemd + # /etc/systemd/system + # /lib/systemd/system + # /etc/udev + # /etc/udev/rules.d + # ) + # set(CPACK_PACKAGE_VENDOR "LNLS") + # set(CPACK_PACKAGE_CONTACT "Lucas Russo ") # + # include(CPack) + # + # cpack_add_component_group(PciedriverAll + # DISPLAY_NAME "pcieDriver drivers, headers and libraries" + # ) + # + # cpack_add_component(Pciedriver + # DISPLAY_NAME "pcieDriver drivers, headers and libraries" + # GROUP PciedriverAll + # INSTALL_TYPES FullDriver + # ) + # + # cpack_add_install_type(FullDriver + # DISPLAY_NAME "Full drivers, headers and libraries" + # ) + # # endif() endif() diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 140423dd..be32b3a7 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -494,55 +494,60 @@ endforeach() option(ENABLE_CPACK "Enables cpack rules" ON) if(ENABLE_CPACK) - if(${CMAKE_BUILD_TYPE} MATCHES "Debug") - set(CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY TRUE) - set(CMAKE_INSTALL_DEBUG_LIBRARIES TRUE) - set(CMAKE_INSTALL_UCRT_LIBRARIES TRUE) - endif() + if(CMAKE_CURRENT_BINARY_DIR STREQUAL CMAKE_BINARY_DIR) + if(${CMAKE_BUILD_TYPE} MATCHES "Debug") + set(CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY TRUE) + set(CMAKE_INSTALL_DEBUG_LIBRARIES TRUE) + set(CMAKE_INSTALL_UCRT_LIBRARIES TRUE) + endif() - include(InstallRequiredSystemLibraries) - - # set architecture as detected by TargetArch module - set(arch_name ${ARCH}) - - list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_BINARY_DIR}) - set(CPACK_GENERATOR "DEB") - set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS_POLICY ">=") - set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS ON) - set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS OFF) - set(CPACK_RPM_PACKAGE_AUTOREQ no) - set(CPACK_RPM_PACKAGE_AUTOPROV yes) - set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION - /lib - /usr/etc - /etc/systemd - /lib/systemd - /etc/systemd/system - /lib/systemd/system - /etc/udev - /etc/udev/rules.d - ) - set(CPACK_PACKAGE_NAME "halcs_examples") - set(halcs_examples_DISTRO_VERSION "" CACHE STRING "halcs_examples distribution version") - string(APPEND halcs_examples_VERSION "${halcs_examples_DISTRO_VERSION}") - set(CPACK_PACKAGE_FILE_NAME - "${CPACK_PACKAGE_NAME}_${halcs_examples_VERSION}_${arch_name}" - ) - set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "SDB filesystem library") - set(CPACK_PACKAGE_VENDOR "LNLS") - set(CPACK_PACKAGE_CONTACT "Lucas Russo ") - set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_BINARY_DIR}/COPYING.txt") - # set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_BINARY_DIR}/README.txt") - # set(CPACK_RESOURCE_FILE_WELCOME "${CMAKE_CURRENT_BINARY_DIR}/WELCOME.txt") - # set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/branding.bmp") - set(CPACK_PACKAGE_VERSION ${halcs_examples_VERSION}) - set(CPACK_PACKAGE_VERSION_MAJOR ${halcs_examples_VERSION_MAJOR}) - set(CPACK_PACKAGE_VERSION_MINOR ${halcs_examples_VERSION_MINOR}) - set(CPACK_PACKAGE_VERSION_PATCH ${halcs_examples_VERSION_PATCH}) - # set(CPACK_PACKAGE_INSTALL_DIRECTORY "HALCS examples Install Directory") - # set(CPACK_TEMPORARY_DIRECTORY "HALCS examples Temporary CPack Directory") + include(InstallRequiredSystemLibraries) + + # set architecture as detected by TargetArch module + set(arch_name ${ARCH}) + + list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_BINARY_DIR}) + set(CPACK_GENERATOR "DEB") + set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS_POLICY ">=") + set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS ON) + set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) + # Generate debuginfo package + set(CPACK_DEBIAN_DEBUGINFO_PACKAGE ON) + set(CPACK_RPM_PACKAGE_AUTOREQ no) + set(CPACK_RPM_PACKAGE_AUTOPROV yes) + set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION + /lib + /usr/etc + /etc/systemd + /lib/systemd + /etc/systemd/system + /lib/systemd/system + /etc/udev + /etc/udev/rules.d + ) + set(CPACK_PACKAGE_NAME "halcs_examples") + set(halcs_examples_DISTRO_VERSION "" CACHE STRING "halcs_examples distribution version") + string(APPEND halcs_examples_VERSION "${halcs_examples_DISTRO_VERSION}") + set(CPACK_PACKAGE_FILE_NAME + "${CPACK_PACKAGE_NAME}_${halcs_examples_VERSION}_${arch_name}" + ) + set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "SDB filesystem library") + set(CPACK_PACKAGE_VENDOR "LNLS") + set(CPACK_PACKAGE_CONTACT "Lucas Russo ") + set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_BINARY_DIR}/COPYING.txt") + # set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_BINARY_DIR}/README.txt") + # set(CPACK_RESOURCE_FILE_WELCOME "${CMAKE_CURRENT_BINARY_DIR}/WELCOME.txt") + # set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/branding.bmp") + set(CPACK_PACKAGE_VERSION ${halcs_examples_VERSION}) + set(CPACK_PACKAGE_VERSION_MAJOR ${halcs_examples_VERSION_MAJOR}) + set(CPACK_PACKAGE_VERSION_MINOR ${halcs_examples_VERSION_MINOR}) + set(CPACK_PACKAGE_VERSION_PATCH ${halcs_examples_VERSION_PATCH}) + # set(CPACK_PACKAGE_INSTALL_DIRECTORY "HALCS examples Install Directory") + # set(CPACK_TEMPORARY_DIRECTORY "HALCS examples Temporary CPack Directory") + # Generate debuginfo package + set(CPACK_RPM_DEBUGINFO_PACKAGE ON) + set(CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX "/usr/src/debug/${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}") - if(CMAKE_CURRENT_BINARY_DIR STREQUAL CMAKE_BINARY_DIR) include(CPack) cpack_add_component_group(Development diff --git a/libs/acqclient/CMakeLists.txt b/libs/acqclient/CMakeLists.txt index 8f2bd289..36e14203 100644 --- a/libs/acqclient/CMakeLists.txt +++ b/libs/acqclient/CMakeLists.txt @@ -492,55 +492,60 @@ endif() option(ENABLE_CPACK "Enables cpack rules" ON) if(ENABLE_CPACK) - if(${CMAKE_BUILD_TYPE} MATCHES "Debug") - set(CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY TRUE) - set(CMAKE_INSTALL_DEBUG_LIBRARIES TRUE) - set(CMAKE_INSTALL_UCRT_LIBRARIES TRUE) - endif() - - include(InstallRequiredSystemLibraries) - - # set architecture as detected by TargetArch module - set(arch_name ${ARCH}) - - list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_BINARY_DIR}) - set(CPACK_GENERATOR "DEB") - set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS_POLICY ">=") - set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS ON) - set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS OFF) - set(CPACK_RPM_PACKAGE_AUTOREQ no) - set(CPACK_RPM_PACKAGE_AUTOPROV yes) - set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION - /lib - /usr/etc - /etc/systemd - /lib/systemd - /etc/systemd/system - /lib/systemd/system - /etc/udev - /etc/udev/rules.d - ) - set(CPACK_PACKAGE_NAME "acqclient") - set(acqclient_DISTRO_VERSION "" CACHE STRING "acqclient distribution version") - string(APPEND acqclient_VERSION "${acqclient_DISTRO_VERSION}") - set(CPACK_PACKAGE_FILE_NAME - "${CPACK_PACKAGE_NAME}_${acqclient_VERSION}_${arch_name}" - ) - set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "HALCS acquisition library") - set(CPACK_PACKAGE_VENDOR "LNLS") - set(CPACK_PACKAGE_CONTACT "Lucas Russo ") - set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_BINARY_DIR}/COPYING.txt") - # set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_BINARY_DIR}/README.txt") - # set(CPACK_RESOURCE_FILE_WELCOME "${CMAKE_CURRENT_BINARY_DIR}/WELCOME.txt") - # set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/branding.bmp") - set(CPACK_PACKAGE_VERSION ${acqclient_VERSION}) - set(CPACK_PACKAGE_VERSION_MAJOR ${acqclient_VERSION_MAJOR}) - set(CPACK_PACKAGE_VERSION_MINOR ${acqclient_VERSION_MINOR}) - set(CPACK_PACKAGE_VERSION_PATCH ${acqclient_VERSION_PATCH}) - # set(CPACK_PACKAGE_INSTALL_DIRECTORY "acqclient Install Directory") - # set(CPACK_TEMPORARY_DIRECTORY "acqclient Temporary CPack Directory") - if(CMAKE_CURRENT_BINARY_DIR STREQUAL CMAKE_BINARY_DIR) + if(${CMAKE_BUILD_TYPE} MATCHES "Debug") + set(CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY TRUE) + set(CMAKE_INSTALL_DEBUG_LIBRARIES TRUE) + set(CMAKE_INSTALL_UCRT_LIBRARIES TRUE) + endif() + + include(InstallRequiredSystemLibraries) + + # set architecture as detected by TargetArch module + set(arch_name ${ARCH}) + + list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_BINARY_DIR}) + set(CPACK_GENERATOR "DEB") + set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS_POLICY ">=") + set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS ON) + set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) + # Generate debuginfo package + set(CPACK_DEBIAN_DEBUGINFO_PACKAGE ON) + set(CPACK_RPM_PACKAGE_AUTOREQ no) + set(CPACK_RPM_PACKAGE_AUTOPROV yes) + set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION + /lib + /usr/etc + /etc/systemd + /lib/systemd + /etc/systemd/system + /lib/systemd/system + /etc/udev + /etc/udev/rules.d + ) + set(CPACK_PACKAGE_NAME "acqclient") + set(acqclient_DISTRO_VERSION "" CACHE STRING "acqclient distribution version") + string(APPEND acqclient_VERSION "${acqclient_DISTRO_VERSION}") + set(CPACK_PACKAGE_FILE_NAME + "${CPACK_PACKAGE_NAME}_${acqclient_VERSION}_${arch_name}" + ) + set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "HALCS acquisition library") + set(CPACK_PACKAGE_VENDOR "LNLS") + set(CPACK_PACKAGE_CONTACT "Lucas Russo ") + set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_BINARY_DIR}/COPYING.txt") + # set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_BINARY_DIR}/README.txt") + # set(CPACK_RESOURCE_FILE_WELCOME "${CMAKE_CURRENT_BINARY_DIR}/WELCOME.txt") + # set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/branding.bmp") + set(CPACK_PACKAGE_VERSION ${acqclient_VERSION}) + set(CPACK_PACKAGE_VERSION_MAJOR ${acqclient_VERSION_MAJOR}) + set(CPACK_PACKAGE_VERSION_MINOR ${acqclient_VERSION_MINOR}) + set(CPACK_PACKAGE_VERSION_PATCH ${acqclient_VERSION_PATCH}) + # set(CPACK_PACKAGE_INSTALL_DIRECTORY "acqclient Install Directory") + # set(CPACK_TEMPORARY_DIRECTORY "acqclient Temporary CPack Directory") + # Generate debuginfo package + set(CPACK_RPM_DEBUGINFO_PACKAGE ON) + set(CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX "/usr/src/debug/${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}") + include(CPack) cpack_add_component_group(Development diff --git a/libs/bpmclient/CMakeLists.txt b/libs/bpmclient/CMakeLists.txt index 59a6c3f1..6bd1b2f6 100644 --- a/libs/bpmclient/CMakeLists.txt +++ b/libs/bpmclient/CMakeLists.txt @@ -515,55 +515,60 @@ endif() option(ENABLE_CPACK "Enables cpack rules" ON) if(ENABLE_CPACK) - if(${CMAKE_BUILD_TYPE} MATCHES "Debug") - set(CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY TRUE) - set(CMAKE_INSTALL_DEBUG_LIBRARIES TRUE) - set(CMAKE_INSTALL_UCRT_LIBRARIES TRUE) - endif() - - include(InstallRequiredSystemLibraries) - - # set architecture as detected by TargetArch module - set(arch_name ${ARCH}) - - list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_BINARY_DIR}) - set(CPACK_GENERATOR "DEB") - set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS_POLICY ">=") - set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS ON) - set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS OFF) - set(CPACK_RPM_PACKAGE_AUTOREQ no) - set(CPACK_RPM_PACKAGE_AUTOPROV yes) - set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION - /lib - /usr/etc - /etc/systemd - /lib/systemd - /etc/systemd/system - /lib/systemd/system - /etc/udev - /etc/udev/rules.d - ) - set(CPACK_PACKAGE_NAME "bpmclient") - set(bpmclient_DISTRO_VERSION "" CACHE STRING "bpmclient distribution version") - string(APPEND bpmclient_VERSION "${bpmclient_DISTRO_VERSION}") - set(CPACK_PACKAGE_FILE_NAME - "${CPACK_PACKAGE_NAME}_${bpmclient_VERSION}_${arch_name}" - ) - set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "HALCS BPM library") - set(CPACK_PACKAGE_VENDOR "LNLS") - set(CPACK_PACKAGE_CONTACT "Lucas Russo ") - set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_BINARY_DIR}/COPYING.txt") - # set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_BINARY_DIR}/README.txt") - # set(CPACK_RESOURCE_FILE_WELCOME "${CMAKE_CURRENT_BINARY_DIR}/WELCOME.txt") - # set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/branding.bmp") - set(CPACK_PACKAGE_VERSION ${bpmclient_VERSION}) - set(CPACK_PACKAGE_VERSION_MAJOR ${bpmclient_VERSION_MAJOR}) - set(CPACK_PACKAGE_VERSION_MINOR ${bpmclient_VERSION_MINOR}) - set(CPACK_PACKAGE_VERSION_PATCH ${bpmclient_VERSION_PATCH}) - # set(CPACK_PACKAGE_INSTALL_DIRECTORY "bpmclient Install Directory") - # set(CPACK_TEMPORARY_DIRECTORY "bpmclient Temporary CPack Directory") - if(CMAKE_CURRENT_BINARY_DIR STREQUAL CMAKE_BINARY_DIR) + if(${CMAKE_BUILD_TYPE} MATCHES "Debug") + set(CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY TRUE) + set(CMAKE_INSTALL_DEBUG_LIBRARIES TRUE) + set(CMAKE_INSTALL_UCRT_LIBRARIES TRUE) + endif() + + include(InstallRequiredSystemLibraries) + + # set architecture as detected by TargetArch module + set(arch_name ${ARCH}) + + list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_BINARY_DIR}) + set(CPACK_GENERATOR "DEB") + set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS_POLICY ">=") + set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS ON) + set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) + # Generate debuginfo package + set(CPACK_DEBIAN_DEBUGINFO_PACKAGE ON) + set(CPACK_RPM_PACKAGE_AUTOREQ no) + set(CPACK_RPM_PACKAGE_AUTOPROV yes) + set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION + /lib + /usr/etc + /etc/systemd + /lib/systemd + /etc/systemd/system + /lib/systemd/system + /etc/udev + /etc/udev/rules.d + ) + set(CPACK_PACKAGE_NAME "bpmclient") + set(bpmclient_DISTRO_VERSION "" CACHE STRING "bpmclient distribution version") + string(APPEND bpmclient_VERSION "${bpmclient_DISTRO_VERSION}") + set(CPACK_PACKAGE_FILE_NAME + "${CPACK_PACKAGE_NAME}_${bpmclient_VERSION}_${arch_name}" + ) + set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "HALCS BPM library") + set(CPACK_PACKAGE_VENDOR "LNLS") + set(CPACK_PACKAGE_CONTACT "Lucas Russo ") + set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_BINARY_DIR}/COPYING.txt") + # set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_BINARY_DIR}/README.txt") + # set(CPACK_RESOURCE_FILE_WELCOME "${CMAKE_CURRENT_BINARY_DIR}/WELCOME.txt") + # set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/branding.bmp") + set(CPACK_PACKAGE_VERSION ${bpmclient_VERSION}) + set(CPACK_PACKAGE_VERSION_MAJOR ${bpmclient_VERSION_MAJOR}) + set(CPACK_PACKAGE_VERSION_MINOR ${bpmclient_VERSION_MINOR}) + set(CPACK_PACKAGE_VERSION_PATCH ${bpmclient_VERSION_PATCH}) + # set(CPACK_PACKAGE_INSTALL_DIRECTORY "bpmclient Install Directory") + # set(CPACK_TEMPORARY_DIRECTORY "bpmclient Temporary CPack Directory") + # Generate debuginfo package + set(CPACK_RPM_DEBUGINFO_PACKAGE ON) + set(CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX "/usr/src/debug/${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}") + include(CPack) cpack_add_component_group(Development diff --git a/libs/convc/CMakeLists.txt b/libs/convc/CMakeLists.txt index b3140110..351b628c 100644 --- a/libs/convc/CMakeLists.txt +++ b/libs/convc/CMakeLists.txt @@ -386,55 +386,60 @@ endif() option(ENABLE_CPACK "Enables cpack rules" ON) if(ENABLE_CPACK) - if(${CMAKE_BUILD_TYPE} MATCHES "Debug") - set(CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY TRUE) - set(CMAKE_INSTALL_DEBUG_LIBRARIES TRUE) - set(CMAKE_INSTALL_UCRT_LIBRARIES TRUE) - endif() - - include(InstallRequiredSystemLibraries) - - # set architecture as detected by TargetArch module - set(arch_name ${ARCH}) - - list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_BINARY_DIR}) - set(CPACK_GENERATOR "DEB") - set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS_POLICY ">=") - set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS ON) - set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS OFF) - set(CPACK_RPM_PACKAGE_AUTOREQ no) - set(CPACK_RPM_PACKAGE_AUTOPROV yes) - set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION - /lib - /usr/etc - /etc/systemd - /lib/systemd - /etc/systemd/system - /lib/systemd/system - /etc/udev - /etc/udev/rules.d - ) - set(CPACK_PACKAGE_NAME "convc") - set(convc_DISTRO_VERSION "" CACHE STRING "convc distribution version") - string(APPEND convc_VERSION "${convc_DISTRO_VERSION}") - set(CPACK_PACKAGE_FILE_NAME - "${CPACK_PACKAGE_NAME}_${convc_VERSION}_${arch_name}" - ) - set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "HALCS Conversion library") - set(CPACK_PACKAGE_VENDOR "LNLS") - set(CPACK_PACKAGE_CONTACT "Lucas Russo ") - set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_BINARY_DIR}/COPYING.txt") - # set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_BINARY_DIR}/README.txt") - # set(CPACK_RESOURCE_FILE_WELCOME "${CMAKE_CURRENT_BINARY_DIR}/WELCOME.txt") - # set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/branding.bmp") - set(CPACK_PACKAGE_VERSION ${convc_VERSION}) - set(CPACK_PACKAGE_VERSION_MAJOR ${convc_VERSION_MAJOR}) - set(CPACK_PACKAGE_VERSION_MINOR ${convc_VERSION_MINOR}) - set(CPACK_PACKAGE_VERSION_PATCH ${convc_VERSION_PATCH}) - # set(CPACK_PACKAGE_INSTALL_DIRECTORY "convc Install Directory") - # set(CPACK_TEMPORARY_DIRECTORY "convc Temporary CPack Directory") - if(CMAKE_CURRENT_BINARY_DIR STREQUAL CMAKE_BINARY_DIR) + if(${CMAKE_BUILD_TYPE} MATCHES "Debug") + set(CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY TRUE) + set(CMAKE_INSTALL_DEBUG_LIBRARIES TRUE) + set(CMAKE_INSTALL_UCRT_LIBRARIES TRUE) + endif() + + include(InstallRequiredSystemLibraries) + + # set architecture as detected by TargetArch module + set(arch_name ${ARCH}) + + list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_BINARY_DIR}) + set(CPACK_GENERATOR "DEB") + set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS_POLICY ">=") + set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS ON) + set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) + # Generate debuginfo package + set(CPACK_DEBIAN_DEBUGINFO_PACKAGE ON) + set(CPACK_RPM_PACKAGE_AUTOREQ no) + set(CPACK_RPM_PACKAGE_AUTOPROV yes) + set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION + /lib + /usr/etc + /etc/systemd + /lib/systemd + /etc/systemd/system + /lib/systemd/system + /etc/udev + /etc/udev/rules.d + ) + set(CPACK_PACKAGE_NAME "convc") + set(convc_DISTRO_VERSION "" CACHE STRING "convc distribution version") + string(APPEND convc_VERSION "${convc_DISTRO_VERSION}") + set(CPACK_PACKAGE_FILE_NAME + "${CPACK_PACKAGE_NAME}_${convc_VERSION}_${arch_name}" + ) + set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "HALCS Conversion library") + set(CPACK_PACKAGE_VENDOR "LNLS") + set(CPACK_PACKAGE_CONTACT "Lucas Russo ") + set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_BINARY_DIR}/COPYING.txt") + # set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_BINARY_DIR}/README.txt") + # set(CPACK_RESOURCE_FILE_WELCOME "${CMAKE_CURRENT_BINARY_DIR}/WELCOME.txt") + # set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/branding.bmp") + set(CPACK_PACKAGE_VERSION ${convc_VERSION}) + set(CPACK_PACKAGE_VERSION_MAJOR ${convc_VERSION_MAJOR}) + set(CPACK_PACKAGE_VERSION_MINOR ${convc_VERSION_MINOR}) + set(CPACK_PACKAGE_VERSION_PATCH ${convc_VERSION_PATCH}) + # set(CPACK_PACKAGE_INSTALL_DIRECTORY "convc Install Directory") + # set(CPACK_TEMPORARY_DIRECTORY "convc Temporary CPack Directory") + # Generate debuginfo package + set(CPACK_RPM_DEBUGINFO_PACKAGE ON) + set(CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX "/usr/src/debug/${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}") + include(CPack) cpack_add_component_group(Development diff --git a/libs/disptable/CMakeLists.txt b/libs/disptable/CMakeLists.txt index 5106796d..1dc91118 100644 --- a/libs/disptable/CMakeLists.txt +++ b/libs/disptable/CMakeLists.txt @@ -409,55 +409,60 @@ endif() option(ENABLE_CPACK "Enables cpack rules" ON) if(ENABLE_CPACK) - if(${CMAKE_BUILD_TYPE} MATCHES "Debug") - set(CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY TRUE) - set(CMAKE_INSTALL_DEBUG_LIBRARIES TRUE) - set(CMAKE_INSTALL_UCRT_LIBRARIES TRUE) - endif() - - include(InstallRequiredSystemLibraries) - - # set architecture as detected by TargetArch module - set(arch_name ${ARCH}) - - list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_BINARY_DIR}) - set(CPACK_GENERATOR "DEB") - set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS_POLICY ">=") - set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS ON) - set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS OFF) - set(CPACK_RPM_PACKAGE_AUTOREQ no) - set(CPACK_RPM_PACKAGE_AUTOPROV yes) - set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION - /lib - /usr/etc - /etc/systemd - /lib/systemd - /etc/systemd/system - /lib/systemd/system - /etc/udev - /etc/udev/rules.d - ) - set(CPACK_PACKAGE_NAME "disptable") - set(disptable_DISTRO_VERSION "" CACHE STRING "disptable distribution version") - string(APPEND disptable_VERSION "${disptable_DISTRO_VERSION}") - set(CPACK_PACKAGE_FILE_NAME - "${CPACK_PACKAGE_NAME}_${disptable_VERSION}_${arch_name}" - ) - set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Dispatch Table library") - set(CPACK_PACKAGE_VENDOR "LNLS") - set(CPACK_PACKAGE_CONTACT "Lucas Russo ") - set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_BINARY_DIR}/COPYING.txt") - # set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_BINARY_DIR}/README.txt") - # set(CPACK_RESOURCE_FILE_WELCOME "${CMAKE_CURRENT_BINARY_DIR}/WELCOME.txt") - # set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/branding.bmp") - set(CPACK_PACKAGE_VERSION ${disptable_VERSION}) - set(CPACK_PACKAGE_VERSION_MAJOR ${disptable_VERSION_MAJOR}) - set(CPACK_PACKAGE_VERSION_MINOR ${disptable_VERSION_MINOR}) - set(CPACK_PACKAGE_VERSION_PATCH ${disptable_VERSION_PATCH}) - # set(CPACK_PACKAGE_INSTALL_DIRECTORY "disptable Install Directory") - # set(CPACK_TEMPORARY_DIRECTORY "disptable Temporary CPack Directory") - if(CMAKE_CURRENT_BINARY_DIR STREQUAL CMAKE_BINARY_DIR) + if(${CMAKE_BUILD_TYPE} MATCHES "Debug") + set(CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY TRUE) + set(CMAKE_INSTALL_DEBUG_LIBRARIES TRUE) + set(CMAKE_INSTALL_UCRT_LIBRARIES TRUE) + endif() + + include(InstallRequiredSystemLibraries) + + # set architecture as detected by TargetArch module + set(arch_name ${ARCH}) + + list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_BINARY_DIR}) + set(CPACK_GENERATOR "DEB") + set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS_POLICY ">=") + set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS ON) + set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) + # Generate debuginfo package + set(CPACK_DEBIAN_DEBUGINFO_PACKAGE ON) + set(CPACK_RPM_PACKAGE_AUTOREQ no) + set(CPACK_RPM_PACKAGE_AUTOPROV yes) + set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION + /lib + /usr/etc + /etc/systemd + /lib/systemd + /etc/systemd/system + /lib/systemd/system + /etc/udev + /etc/udev/rules.d + ) + set(CPACK_PACKAGE_NAME "disptable") + set(disptable_DISTRO_VERSION "" CACHE STRING "disptable distribution version") + string(APPEND disptable_VERSION "${disptable_DISTRO_VERSION}") + set(CPACK_PACKAGE_FILE_NAME + "${CPACK_PACKAGE_NAME}_${disptable_VERSION}_${arch_name}" + ) + set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Dispatch Table library") + set(CPACK_PACKAGE_VENDOR "LNLS") + set(CPACK_PACKAGE_CONTACT "Lucas Russo ") + set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_BINARY_DIR}/COPYING.txt") + # set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_BINARY_DIR}/README.txt") + # set(CPACK_RESOURCE_FILE_WELCOME "${CMAKE_CURRENT_BINARY_DIR}/WELCOME.txt") + # set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/branding.bmp") + set(CPACK_PACKAGE_VERSION ${disptable_VERSION}) + set(CPACK_PACKAGE_VERSION_MAJOR ${disptable_VERSION_MAJOR}) + set(CPACK_PACKAGE_VERSION_MINOR ${disptable_VERSION_MINOR}) + set(CPACK_PACKAGE_VERSION_PATCH ${disptable_VERSION_PATCH}) + # set(CPACK_PACKAGE_INSTALL_DIRECTORY "disptable Install Directory") + # set(CPACK_TEMPORARY_DIRECTORY "disptable Temporary CPack Directory") + # Generate debuginfo package + set(CPACK_RPM_DEBUGINFO_PACKAGE ON) + set(CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX "/usr/src/debug/${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}") + include(CPack) cpack_add_component_group(Development diff --git a/libs/errhand/CMakeLists.txt b/libs/errhand/CMakeLists.txt index 6423cdff..7da0f0fe 100644 --- a/libs/errhand/CMakeLists.txt +++ b/libs/errhand/CMakeLists.txt @@ -430,55 +430,60 @@ endif() option(ENABLE_CPACK "Enables cpack rules" ON) if(ENABLE_CPACK) - if(${CMAKE_BUILD_TYPE} MATCHES "Debug") - set(CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY TRUE) - set(CMAKE_INSTALL_DEBUG_LIBRARIES TRUE) - set(CMAKE_INSTALL_UCRT_LIBRARIES TRUE) - endif() - - include(InstallRequiredSystemLibraries) - - # set architecture as detected by TargetArch module - set(arch_name ${ARCH}) - - list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_BINARY_DIR}) - set(CPACK_GENERATOR "DEB") - set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS_POLICY ">=") - set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS ON) - set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS OFF) - set(CPACK_RPM_PACKAGE_AUTOREQ no) - set(CPACK_RPM_PACKAGE_AUTOPROV yes) - set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION - /lib - /usr/etc - /etc/systemd - /lib/systemd - /etc/systemd/system - /lib/systemd/system - /etc/udev - /etc/udev/rules.d - ) - set(CPACK_PACKAGE_NAME "errhand") - set(errhand_DISTRO_VERSION "" CACHE STRING "errhand distribution version") - string(APPEND errhand_VERSION "${errhand_DISTRO_VERSION}") - set(CPACK_PACKAGE_FILE_NAME - "${CPACK_PACKAGE_NAME}_${errhand_VERSION}_${arch_name}" - ) - set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Error Handling library") - set(CPACK_PACKAGE_VENDOR "LNLS") - set(CPACK_PACKAGE_CONTACT "Lucas Russo ") - set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_BINARY_DIR}/COPYING.txt") - # set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_BINARY_DIR}/README.txt") - # set(CPACK_RESOURCE_FILE_WELCOME "${CMAKE_CURRENT_BINARY_DIR}/WELCOME.txt") - # set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/branding.bmp") - set(CPACK_PACKAGE_VERSION ${errhand_VERSION}) - set(CPACK_PACKAGE_VERSION_MAJOR ${errhand_VERSION_MAJOR}) - set(CPACK_PACKAGE_VERSION_MINOR ${errhand_VERSION_MINOR}) - set(CPACK_PACKAGE_VERSION_PATCH ${errhand_VERSION_PATCH}) - # set(CPACK_PACKAGE_INSTALL_DIRECTORY "errhand Install Directory") - # set(CPACK_TEMPORARY_DIRECTORY "errhand Temporary CPack Directory") - if(CMAKE_CURRENT_BINARY_DIR STREQUAL CMAKE_BINARY_DIR) + if(${CMAKE_BUILD_TYPE} MATCHES "Debug") + set(CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY TRUE) + set(CMAKE_INSTALL_DEBUG_LIBRARIES TRUE) + set(CMAKE_INSTALL_UCRT_LIBRARIES TRUE) + endif() + + include(InstallRequiredSystemLibraries) + + # set architecture as detected by TargetArch module + set(arch_name ${ARCH}) + + list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_BINARY_DIR}) + set(CPACK_GENERATOR "DEB") + set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS_POLICY ">=") + set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS ON) + set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) + # Generate debuginfo package + set(CPACK_DEBIAN_DEBUGINFO_PACKAGE ON) + set(CPACK_RPM_PACKAGE_AUTOREQ no) + set(CPACK_RPM_PACKAGE_AUTOPROV yes) + set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION + /lib + /usr/etc + /etc/systemd + /lib/systemd + /etc/systemd/system + /lib/systemd/system + /etc/udev + /etc/udev/rules.d + ) + set(CPACK_PACKAGE_NAME "errhand") + set(errhand_DISTRO_VERSION "" CACHE STRING "errhand distribution version") + string(APPEND errhand_VERSION "${errhand_DISTRO_VERSION}") + set(CPACK_PACKAGE_FILE_NAME + "${CPACK_PACKAGE_NAME}_${errhand_VERSION}_${arch_name}" + ) + set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Error Handling library") + set(CPACK_PACKAGE_VENDOR "LNLS") + set(CPACK_PACKAGE_CONTACT "Lucas Russo ") + set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_BINARY_DIR}/COPYING.txt") + # set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_BINARY_DIR}/README.txt") + # set(CPACK_RESOURCE_FILE_WELCOME "${CMAKE_CURRENT_BINARY_DIR}/WELCOME.txt") + # set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/branding.bmp") + set(CPACK_PACKAGE_VERSION ${errhand_VERSION}) + set(CPACK_PACKAGE_VERSION_MAJOR ${errhand_VERSION_MAJOR}) + set(CPACK_PACKAGE_VERSION_MINOR ${errhand_VERSION_MINOR}) + set(CPACK_PACKAGE_VERSION_PATCH ${errhand_VERSION_PATCH}) + # set(CPACK_PACKAGE_INSTALL_DIRECTORY "errhand Install Directory") + # set(CPACK_TEMPORARY_DIRECTORY "errhand Temporary CPack Directory") + # Generate debuginfo package + set(CPACK_RPM_DEBUGINFO_PACKAGE ON) + set(CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX "/usr/src/debug/${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}") + include(CPack) cpack_add_component_group(Development diff --git a/libs/hutils/CMakeLists.txt b/libs/hutils/CMakeLists.txt index 6284475b..4cf2cef4 100644 --- a/libs/hutils/CMakeLists.txt +++ b/libs/hutils/CMakeLists.txt @@ -417,55 +417,60 @@ endif() option(ENABLE_CPACK "Enables cpack rules" ON) if(ENABLE_CPACK) - if(${CMAKE_BUILD_TYPE} MATCHES "Debug") - set(CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY TRUE) - set(CMAKE_INSTALL_DEBUG_LIBRARIES TRUE) - set(CMAKE_INSTALL_UCRT_LIBRARIES TRUE) - endif() + if(CMAKE_CURRENT_BINARY_DIR STREQUAL CMAKE_BINARY_DIR) + if(${CMAKE_BUILD_TYPE} MATCHES "Debug") + set(CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY TRUE) + set(CMAKE_INSTALL_DEBUG_LIBRARIES TRUE) + set(CMAKE_INSTALL_UCRT_LIBRARIES TRUE) + endif() - include(InstallRequiredSystemLibraries) - - # set architecture as detected by TargetArch module - set(arch_name ${ARCH}) - - list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_BINARY_DIR}) - set(CPACK_GENERATOR "DEB") - set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS_POLICY ">=") - set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS ON) - set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS OFF) - set(CPACK_RPM_PACKAGE_AUTOREQ no) - set(CPACK_RPM_PACKAGE_AUTOPROV yes) - set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION - /lib - /usr/etc - /etc/systemd - /lib/systemd - /etc/systemd/system - /lib/systemd/system - /etc/udev - /etc/udev/rules.d - ) - set(CPACK_PACKAGE_NAME "hutils") - set(hutils_DISTRO_VERSION "" CACHE STRING "hutils distribution version") - string(APPEND hutils_VERSION "${hutils_DISTRO_VERSION}") - set(CPACK_PACKAGE_FILE_NAME - "${CPACK_PACKAGE_NAME}_${hutils_VERSION}_${arch_name}" - ) - set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "HALCS utilities library") - set(CPACK_PACKAGE_VENDOR "LNLS") - set(CPACK_PACKAGE_CONTACT "Lucas Russo ") - set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_BINARY_DIR}/COPYING.txt") - # set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_BINARY_DIR}/README.txt") - # set(CPACK_RESOURCE_FILE_WELCOME "${CMAKE_CURRENT_BINARY_DIR}/WELCOME.txt") - # set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/branding.bmp") - set(CPACK_PACKAGE_VERSION ${hutils_VERSION}) - set(CPACK_PACKAGE_VERSION_MAJOR ${hutils_VERSION_MAJOR}) - set(CPACK_PACKAGE_VERSION_MINOR ${hutils_VERSION_MINOR}) - set(CPACK_PACKAGE_VERSION_PATCH ${hutils_VERSION_PATCH}) - # set(CPACK_PACKAGE_INSTALL_DIRECTORY "hutils Install Directory") - # set(CPACK_TEMPORARY_DIRECTORY "hutils Temporary CPack Directory") + include(InstallRequiredSystemLibraries) + + # set architecture as detected by TargetArch module + set(arch_name ${ARCH}) + + list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_BINARY_DIR}) + set(CPACK_GENERATOR "DEB") + set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS_POLICY ">=") + set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS ON) + set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) + # Generate debuginfo package + set(CPACK_DEBIAN_DEBUGINFO_PACKAGE ON) + set(CPACK_RPM_PACKAGE_AUTOREQ no) + set(CPACK_RPM_PACKAGE_AUTOPROV yes) + set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION + /lib + /usr/etc + /etc/systemd + /lib/systemd + /etc/systemd/system + /lib/systemd/system + /etc/udev + /etc/udev/rules.d + ) + set(CPACK_PACKAGE_NAME "hutils") + set(hutils_DISTRO_VERSION "" CACHE STRING "hutils distribution version") + string(APPEND hutils_VERSION "${hutils_DISTRO_VERSION}") + set(CPACK_PACKAGE_FILE_NAME + "${CPACK_PACKAGE_NAME}_${hutils_VERSION}_${arch_name}" + ) + set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "HALCS utilities library") + set(CPACK_PACKAGE_VENDOR "LNLS") + set(CPACK_PACKAGE_CONTACT "Lucas Russo ") + set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_BINARY_DIR}/COPYING.txt") + # set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_BINARY_DIR}/README.txt") + # set(CPACK_RESOURCE_FILE_WELCOME "${CMAKE_CURRENT_BINARY_DIR}/WELCOME.txt") + # set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/branding.bmp") + set(CPACK_PACKAGE_VERSION ${hutils_VERSION}) + set(CPACK_PACKAGE_VERSION_MAJOR ${hutils_VERSION_MAJOR}) + set(CPACK_PACKAGE_VERSION_MINOR ${hutils_VERSION_MINOR}) + set(CPACK_PACKAGE_VERSION_PATCH ${hutils_VERSION_PATCH}) + # set(CPACK_PACKAGE_INSTALL_DIRECTORY "hutils Install Directory") + # set(CPACK_TEMPORARY_DIRECTORY "hutils Temporary CPack Directory") + # Generate debuginfo package + set(CPACK_RPM_DEBUGINFO_PACKAGE ON) + set(CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX "/usr/src/debug/${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}") - if(CMAKE_CURRENT_BINARY_DIR STREQUAL CMAKE_BINARY_DIR) include(CPack) cpack_add_component_group(Development diff --git a/libs/llio/CMakeLists.txt b/libs/llio/CMakeLists.txt index 4a67d6ad..f10200db 100644 --- a/libs/llio/CMakeLists.txt +++ b/libs/llio/CMakeLists.txt @@ -477,55 +477,60 @@ endif() option(ENABLE_CPACK "Enables cpack rules" ON) if(ENABLE_CPACK) - if(${CMAKE_BUILD_TYPE} MATCHES "Debug") - set(CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY TRUE) - set(CMAKE_INSTALL_DEBUG_LIBRARIES TRUE) - set(CMAKE_INSTALL_UCRT_LIBRARIES TRUE) - endif() - - include(InstallRequiredSystemLibraries) - - # set architecture as detected by TargetArch module - set(arch_name ${ARCH}) - - list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_BINARY_DIR}) - set(CPACK_GENERATOR "DEB") - set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS_POLICY ">=") - set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS ON) - set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS OFF) - set(CPACK_RPM_PACKAGE_AUTOREQ no) - set(CPACK_RPM_PACKAGE_AUTOPROV yes) - set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION - /lib - /usr/etc - /etc/systemd - /lib/systemd - /etc/systemd/system - /lib/systemd/system - /etc/udev - /etc/udev/rules.d - ) - set(CPACK_PACKAGE_NAME "llio") - set(llio_DISTRO_VERSION "" CACHE STRING "llio distribution version") - string(APPEND llio_VERSION "${llio_DISTRO_VERSION}") - set(CPACK_PACKAGE_FILE_NAME - "${CPACK_PACKAGE_NAME}_${llio_VERSION}_${arch_name}" - ) - set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Low-level I/O library") - set(CPACK_PACKAGE_VENDOR "LNLS") - set(CPACK_PACKAGE_CONTACT "Lucas Russo ") - set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_BINARY_DIR}/COPYING.txt") - # set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_BINARY_DIR}/README.txt") - # set(CPACK_RESOURCE_FILE_WELCOME "${CMAKE_CURRENT_BINARY_DIR}/WELCOME.txt") - # set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/branding.bmp") - set(CPACK_PACKAGE_VERSION ${llio_VERSION}) - set(CPACK_PACKAGE_VERSION_MAJOR ${llio_VERSION_MAJOR}) - set(CPACK_PACKAGE_VERSION_MINOR ${llio_VERSION_MINOR}) - set(CPACK_PACKAGE_VERSION_PATCH ${llio_VERSION_PATCH}) - # set(CPACK_PACKAGE_INSTALL_DIRECTORY "llio Install Directory") - # set(CPACK_TEMPORARY_DIRECTORY "llio Temporary CPack Directory") - if(CMAKE_CURRENT_BINARY_DIR STREQUAL CMAKE_BINARY_DIR) + if(${CMAKE_BUILD_TYPE} MATCHES "Debug") + set(CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY TRUE) + set(CMAKE_INSTALL_DEBUG_LIBRARIES TRUE) + set(CMAKE_INSTALL_UCRT_LIBRARIES TRUE) + endif() + + include(InstallRequiredSystemLibraries) + + # set architecture as detected by TargetArch module + set(arch_name ${ARCH}) + + list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_BINARY_DIR}) + set(CPACK_GENERATOR "DEB") + set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS_POLICY ">=") + set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS ON) + set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) + # Generate debuginfo package + set(CPACK_DEBIAN_DEBUGINFO_PACKAGE ON) + set(CPACK_RPM_PACKAGE_AUTOREQ no) + set(CPACK_RPM_PACKAGE_AUTOPROV yes) + set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION + /lib + /usr/etc + /etc/systemd + /lib/systemd + /etc/systemd/system + /lib/systemd/system + /etc/udev + /etc/udev/rules.d + ) + set(CPACK_PACKAGE_NAME "llio") + set(llio_DISTRO_VERSION "" CACHE STRING "llio distribution version") + string(APPEND llio_VERSION "${llio_DISTRO_VERSION}") + set(CPACK_PACKAGE_FILE_NAME + "${CPACK_PACKAGE_NAME}_${llio_VERSION}_${arch_name}" + ) + set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Low-level I/O library") + set(CPACK_PACKAGE_VENDOR "LNLS") + set(CPACK_PACKAGE_CONTACT "Lucas Russo ") + set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_BINARY_DIR}/COPYING.txt") + # set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_BINARY_DIR}/README.txt") + # set(CPACK_RESOURCE_FILE_WELCOME "${CMAKE_CURRENT_BINARY_DIR}/WELCOME.txt") + # set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/branding.bmp") + set(CPACK_PACKAGE_VERSION ${llio_VERSION}) + set(CPACK_PACKAGE_VERSION_MAJOR ${llio_VERSION_MAJOR}) + set(CPACK_PACKAGE_VERSION_MINOR ${llio_VERSION_MINOR}) + set(CPACK_PACKAGE_VERSION_PATCH ${llio_VERSION_PATCH}) + # set(CPACK_PACKAGE_INSTALL_DIRECTORY "llio Install Directory") + # set(CPACK_TEMPORARY_DIRECTORY "llio Temporary CPack Directory") + # Generate debuginfo package + set(CPACK_RPM_DEBUGINFO_PACKAGE ON) + set(CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX "/usr/src/debug/${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}") + include(CPack) cpack_add_component_group(Development diff --git a/libs/sdbfs/CMakeLists.txt b/libs/sdbfs/CMakeLists.txt index 93e9e995..553f306b 100644 --- a/libs/sdbfs/CMakeLists.txt +++ b/libs/sdbfs/CMakeLists.txt @@ -621,55 +621,60 @@ endif() option(ENABLE_CPACK "Enables cpack rules" ON) if(ENABLE_CPACK) - if(${CMAKE_BUILD_TYPE} MATCHES "Debug") - set(CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY TRUE) - set(CMAKE_INSTALL_DEBUG_LIBRARIES TRUE) - set(CMAKE_INSTALL_UCRT_LIBRARIES TRUE) - endif() + if(CMAKE_CURRENT_BINARY_DIR STREQUAL CMAKE_BINARY_DIR) + if(${CMAKE_BUILD_TYPE} MATCHES "Debug") + set(CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY TRUE) + set(CMAKE_INSTALL_DEBUG_LIBRARIES TRUE) + set(CMAKE_INSTALL_UCRT_LIBRARIES TRUE) + endif() - include(InstallRequiredSystemLibraries) - - # set architecture as detected by TargetArch module - set(arch_name ${ARCH}) - - list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_BINARY_DIR}) - set(CPACK_GENERATOR "DEB") - set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS_POLICY ">=") - set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS ON) - set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS OFF) - set(CPACK_RPM_PACKAGE_AUTOREQ no) - set(CPACK_RPM_PACKAGE_AUTOPROV yes) - set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION - /lib - /usr/etc - /etc/systemd - /lib/systemd - /etc/systemd/system - /lib/systemd/system - /etc/udev - /etc/udev/rules.d - ) - set(CPACK_PACKAGE_NAME "sdbfs") - set(sdbfs_DISTRO_VERSION "" CACHE STRING "sdbfs distribution version") - string(APPEND sdbfs_VERSION "${sdbfs_DISTRO_VERSION}") - set(CPACK_PACKAGE_FILE_NAME - "${CPACK_PACKAGE_NAME}_${sdbfs_VERSION}_${arch_name}" - ) - set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "SDB filesystem library") - set(CPACK_PACKAGE_VENDOR "LNLS") - set(CPACK_PACKAGE_CONTACT "Lucas Russo ") - set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_BINARY_DIR}/COPYING.txt") - # set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_BINARY_DIR}/README.txt") - # set(CPACK_RESOURCE_FILE_WELCOME "${CMAKE_CURRENT_BINARY_DIR}/WELCOME.txt") - # set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/branding.bmp") - set(CPACK_PACKAGE_VERSION ${sdbfs_VERSION}) - set(CPACK_PACKAGE_VERSION_MAJOR ${sdbfs_VERSION_MAJOR}) - set(CPACK_PACKAGE_VERSION_MINOR ${sdbfs_VERSION_MINOR}) - set(CPACK_PACKAGE_VERSION_PATCH ${sdbfs_VERSION_PATCH}) - # set(CPACK_PACKAGE_INSTALL_DIRECTORY "sdbfs Install Directory") - # set(CPACK_TEMPORARY_DIRECTORY "sdbfs Temporary CPack Directory") + include(InstallRequiredSystemLibraries) + + # set architecture as detected by TargetArch module + set(arch_name ${ARCH}) + + list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_BINARY_DIR}) + set(CPACK_GENERATOR "DEB") + set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS_POLICY ">=") + set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS ON) + set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) + # Generate debuginfo package + set(CPACK_DEBIAN_DEBUGINFO_PACKAGE ON) + set(CPACK_RPM_PACKAGE_AUTOREQ no) + set(CPACK_RPM_PACKAGE_AUTOPROV yes) + set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION + /lib + /usr/etc + /etc/systemd + /lib/systemd + /etc/systemd/system + /lib/systemd/system + /etc/udev + /etc/udev/rules.d + ) + set(CPACK_PACKAGE_NAME "sdbfs") + set(sdbfs_DISTRO_VERSION "" CACHE STRING "sdbfs distribution version") + string(APPEND sdbfs_VERSION "${sdbfs_DISTRO_VERSION}") + set(CPACK_PACKAGE_FILE_NAME + "${CPACK_PACKAGE_NAME}_${sdbfs_VERSION}_${arch_name}" + ) + set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "SDB filesystem library") + set(CPACK_PACKAGE_VENDOR "LNLS") + set(CPACK_PACKAGE_CONTACT "Lucas Russo ") + set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_BINARY_DIR}/COPYING.txt") + # set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_BINARY_DIR}/README.txt") + # set(CPACK_RESOURCE_FILE_WELCOME "${CMAKE_CURRENT_BINARY_DIR}/WELCOME.txt") + # set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/branding.bmp") + set(CPACK_PACKAGE_VERSION ${sdbfs_VERSION}) + set(CPACK_PACKAGE_VERSION_MAJOR ${sdbfs_VERSION_MAJOR}) + set(CPACK_PACKAGE_VERSION_MINOR ${sdbfs_VERSION_MINOR}) + set(CPACK_PACKAGE_VERSION_PATCH ${sdbfs_VERSION_PATCH}) + # set(CPACK_PACKAGE_INSTALL_DIRECTORY "sdbfs Install Directory") + # set(CPACK_TEMPORARY_DIRECTORY "sdbfs Temporary CPack Directory") + # Generate debuginfo package + set(CPACK_RPM_DEBUGINFO_PACKAGE ON) + set(CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX "/usr/src/debug/${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}") - if(CMAKE_CURRENT_BINARY_DIR STREQUAL CMAKE_BINARY_DIR) include(CPack) cpack_add_component_group(Development diff --git a/libs/sdbutils/CMakeLists.txt b/libs/sdbutils/CMakeLists.txt index 97b1407c..64c0f009 100644 --- a/libs/sdbutils/CMakeLists.txt +++ b/libs/sdbutils/CMakeLists.txt @@ -363,55 +363,60 @@ endif() option(ENABLE_CPACK "Enables cpack rules" ON) if(ENABLE_CPACK) - if(${CMAKE_BUILD_TYPE} MATCHES "Debug") - set(CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY TRUE) - set(CMAKE_INSTALL_DEBUG_LIBRARIES TRUE) - set(CMAKE_INSTALL_UCRT_LIBRARIES TRUE) - endif() - - include(InstallRequiredSystemLibraries) - - # set architecture as detected by TargetArch module - set(arch_name ${ARCH}) - - list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_BINARY_DIR}) - set(CPACK_GENERATOR "DEB") - set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS_POLICY ">=") - set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS ON) - set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS OFF) - set(CPACK_RPM_PACKAGE_AUTOREQ no) - set(CPACK_RPM_PACKAGE_AUTOPROV yes) - set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION - /lib - /usr/etc - /etc/systemd - /lib/systemd - /etc/systemd/system - /lib/systemd/system - /etc/udev - /etc/udev/rules.d - ) - set(CPACK_PACKAGE_NAME "sdbutils") - set(sdbutils_DISTRO_VERSION "" CACHE STRING "sdbutils distribution version") - string(APPEND sdbutils_VERSION "${sdbutils_DISTRO_VERSION}") - set(CPACK_PACKAGE_FILE_NAME - "${CPACK_PACKAGE_NAME}_${sdbutils_VERSION}_${arch_name}" - ) - set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "SDB utilities library") - set(CPACK_PACKAGE_VENDOR "LNLS") - set(CPACK_PACKAGE_CONTACT "Lucas Russo ") - set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_BINARY_DIR}/COPYING.txt") - # set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_BINARY_DIR}/README.txt") - # set(CPACK_RESOURCE_FILE_WELCOME "${CMAKE_CURRENT_BINARY_DIR}/WELCOME.txt") - # set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/branding.bmp") - set(CPACK_PACKAGE_VERSION ${sdbutils_VERSION}) - set(CPACK_PACKAGE_VERSION_MAJOR ${sdbutils_VERSION_MAJOR}) - set(CPACK_PACKAGE_VERSION_MINOR ${sdbutils_VERSION_MINOR}) - set(CPACK_PACKAGE_VERSION_PATCH ${sdbutils_VERSION_PATCH}) - # set(CPACK_PACKAGE_INSTALL_DIRECTORY "sdbutils Install Directory") - # set(CPACK_TEMPORARY_DIRECTORY "sdbutils Temporary CPack Directory") - if(CMAKE_CURRENT_BINARY_DIR STREQUAL CMAKE_BINARY_DIR) + if(${CMAKE_BUILD_TYPE} MATCHES "Debug") + set(CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY TRUE) + set(CMAKE_INSTALL_DEBUG_LIBRARIES TRUE) + set(CMAKE_INSTALL_UCRT_LIBRARIES TRUE) + endif() + + include(InstallRequiredSystemLibraries) + + # set architecture as detected by TargetArch module + set(arch_name ${ARCH}) + + list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_BINARY_DIR}) + set(CPACK_GENERATOR "DEB") + set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS_POLICY ">=") + set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS ON) + set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) + # Generate debuginfo package + set(CPACK_DEBIAN_DEBUGINFO_PACKAGE ON) + set(CPACK_RPM_PACKAGE_AUTOREQ no) + set(CPACK_RPM_PACKAGE_AUTOPROV yes) + set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION + /lib + /usr/etc + /etc/systemd + /lib/systemd + /etc/systemd/system + /lib/systemd/system + /etc/udev + /etc/udev/rules.d + ) + set(CPACK_PACKAGE_NAME "sdbutils") + set(sdbutils_DISTRO_VERSION "" CACHE STRING "sdbutils distribution version") + string(APPEND sdbutils_VERSION "${sdbutils_DISTRO_VERSION}") + set(CPACK_PACKAGE_FILE_NAME + "${CPACK_PACKAGE_NAME}_${sdbutils_VERSION}_${arch_name}" + ) + set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "SDB utilities library") + set(CPACK_PACKAGE_VENDOR "LNLS") + set(CPACK_PACKAGE_CONTACT "Lucas Russo ") + set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_BINARY_DIR}/COPYING.txt") + # set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_BINARY_DIR}/README.txt") + # set(CPACK_RESOURCE_FILE_WELCOME "${CMAKE_CURRENT_BINARY_DIR}/WELCOME.txt") + # set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/branding.bmp") + set(CPACK_PACKAGE_VERSION ${sdbutils_VERSION}) + set(CPACK_PACKAGE_VERSION_MAJOR ${sdbutils_VERSION_MAJOR}) + set(CPACK_PACKAGE_VERSION_MINOR ${sdbutils_VERSION_MINOR}) + set(CPACK_PACKAGE_VERSION_PATCH ${sdbutils_VERSION_PATCH}) + # set(CPACK_PACKAGE_INSTALL_DIRECTORY "sdbutils Install Directory") + # set(CPACK_TEMPORARY_DIRECTORY "sdbutils Temporary CPack Directory") + # Generate debuginfo package + set(CPACK_RPM_DEBUGINFO_PACKAGE ON) + set(CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX "/usr/src/debug/${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}") + include(CPack) cpack_add_component_group(Development diff --git a/src/client/CMakeLists.txt b/src/client/CMakeLists.txt index 2fefcbde..44292d86 100644 --- a/src/client/CMakeLists.txt +++ b/src/client/CMakeLists.txt @@ -779,55 +779,60 @@ endif() option(ENABLE_CPACK "Enables cpack rules" ON) if(ENABLE_CPACK) - if(${CMAKE_BUILD_TYPE} MATCHES "Debug") - set(CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY TRUE) - set(CMAKE_INSTALL_DEBUG_LIBRARIES TRUE) - set(CMAKE_INSTALL_UCRT_LIBRARIES TRUE) - endif() - - include(InstallRequiredSystemLibraries) - - # set architecture as detected by TargetArch module - set(arch_name ${ARCH}) - - list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_BINARY_DIR}) - set(CPACK_GENERATOR "DEB") - set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS_POLICY ">=") - set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS ON) - set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS OFF) - set(CPACK_RPM_PACKAGE_AUTOREQ no) - set(CPACK_RPM_PACKAGE_AUTOPROV yes) - set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION - /lib - /usr/etc - /etc/systemd - /lib/systemd - /etc/systemd/system - /lib/systemd/system - /etc/udev - /etc/udev/rules.d - ) - set(CPACK_PACKAGE_NAME "halcsclient") - set(halcsclient_DISTRO_VERSION "" CACHE STRING "halcsclient distribution version") - string(APPEND halcsclient_VERSION "${halcsclient_DISTRO_VERSION}") - set(CPACK_PACKAGE_FILE_NAME - "${CPACK_PACKAGE_NAME}_${halcsclient_VERSION}_${arch_name}" - ) - set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "HALCS Conversion library") - set(CPACK_PACKAGE_VENDOR "LNLS") - set(CPACK_PACKAGE_CONTACT "Lucas Russo ") - set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_BINARY_DIR}/COPYING.txt") - # set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_BINARY_DIR}/README.txt") - # set(CPACK_RESOURCE_FILE_WELCOME "${CMAKE_CURRENT_BINARY_DIR}/WELCOME.txt") - # set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/branding.bmp") - set(CPACK_PACKAGE_VERSION ${halcsclient_VERSION}) - set(CPACK_PACKAGE_VERSION_MAJOR ${halcsclient_VERSION_MAJOR}) - set(CPACK_PACKAGE_VERSION_MINOR ${halcsclient_VERSION_MINOR}) - set(CPACK_PACKAGE_VERSION_PATCH ${halcsclient_VERSION_PATCH}) - # set(CPACK_PACKAGE_INSTALL_DIRECTORY "halcsclient Install Directory") - # set(CPACK_TEMPORARY_DIRECTORY "halcsclient Temporary CPack Directory") - if(CMAKE_CURRENT_BINARY_DIR STREQUAL CMAKE_BINARY_DIR) + if(${CMAKE_BUILD_TYPE} MATCHES "Debug") + set(CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY TRUE) + set(CMAKE_INSTALL_DEBUG_LIBRARIES TRUE) + set(CMAKE_INSTALL_UCRT_LIBRARIES TRUE) + endif() + + include(InstallRequiredSystemLibraries) + + # set architecture as detected by TargetArch module + set(arch_name ${ARCH}) + + list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_BINARY_DIR}) + set(CPACK_GENERATOR "DEB") + set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS_POLICY ">=") + set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS ON) + set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) + # Generate debuginfo package + set(CPACK_DEBIAN_DEBUGINFO_PACKAGE ON) + set(CPACK_RPM_PACKAGE_AUTOREQ no) + set(CPACK_RPM_PACKAGE_AUTOPROV yes) + set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION + /lib + /usr/etc + /etc/systemd + /lib/systemd + /etc/systemd/system + /lib/systemd/system + /etc/udev + /etc/udev/rules.d + ) + set(CPACK_PACKAGE_NAME "halcsclient") + set(halcsclient_DISTRO_VERSION "" CACHE STRING "halcsclient distribution version") + string(APPEND halcsclient_VERSION "${halcsclient_DISTRO_VERSION}") + set(CPACK_PACKAGE_FILE_NAME + "${CPACK_PACKAGE_NAME}_${halcsclient_VERSION}_${arch_name}" + ) + set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "HALCS Conversion library") + set(CPACK_PACKAGE_VENDOR "LNLS") + set(CPACK_PACKAGE_CONTACT "Lucas Russo ") + set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_BINARY_DIR}/COPYING.txt") + # set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_BINARY_DIR}/README.txt") + # set(CPACK_RESOURCE_FILE_WELCOME "${CMAKE_CURRENT_BINARY_DIR}/WELCOME.txt") + # set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/branding.bmp") + set(CPACK_PACKAGE_VERSION ${halcsclient_VERSION}) + set(CPACK_PACKAGE_VERSION_MAJOR ${halcsclient_VERSION_MAJOR}) + set(CPACK_PACKAGE_VERSION_MINOR ${halcsclient_VERSION_MINOR}) + set(CPACK_PACKAGE_VERSION_PATCH ${halcsclient_VERSION_PATCH}) + # set(CPACK_PACKAGE_INSTALL_DIRECTORY "halcsclient Install Directory") + # set(CPACK_TEMPORARY_DIRECTORY "halcsclient Temporary CPack Directory") + # Generate debuginfo package + set(CPACK_RPM_DEBUGINFO_PACKAGE ON) + set(CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX "/usr/src/debug/${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}") + include(CPack) cpack_add_component_group(Development