diff options
author | Mauro <you@example.com> | 2021-06-30 07:57:22 +0000 |
---|---|---|
committer | Mauro Sardara <msardara@cisco.com> | 2021-07-06 16:16:04 +0000 |
commit | 08233d44a6cfde878d7e10bca38ae935ed1c8fd5 (patch) | |
tree | 7ecc534d55bdc7e8dd15ecab084720910bcdf4d9 /cmake/Modules/Packager.cmake | |
parent | 147ba39bed26887f5eba84757e2463ab8e370a9a (diff) |
[HICN-713] Transport Library Major Refactoring 2
Co-authored-by: Luca Muscariello <muscariello@ieee.org>
Co-authored-by: Michele Papalini <micpapal@cisco.com>
Co-authored-by: Olivier Roques <oroques+fdio@cisco.com>
Co-authored-by: Giulio Grassi <gigrassi@cisco.com>
Signed-off-by: Mauro Sardara <msardara@cisco.com>
Change-Id: I5b2c667bad66feb45abdb5effe22ed0f6c85d1c2
Diffstat (limited to 'cmake/Modules/Packager.cmake')
-rw-r--r-- | cmake/Modules/Packager.cmake | 90 |
1 files changed, 53 insertions, 37 deletions
diff --git a/cmake/Modules/Packager.cmake b/cmake/Modules/Packager.cmake index f27479188..105952662 100644 --- a/cmake/Modules/Packager.cmake +++ b/cmake/Modules/Packager.cmake @@ -227,8 +227,11 @@ function(make_packages) set(CMAKE_SKIP_BUILD_RPATH FALSE) set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE) set(CMAKE_INSTALL_RPATH /opt/hicn) + set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) + set(CPACK_SET_DESTDIR true) + set(CMAKE_INSTALL_RPATH "\${CPACK_INSTALL_PREFIX}") set(CMAKE_SKIP_INSTALL_RPATH FALSE) set(HICN_DEPENDECIES_INSTALLER "${LIBTRANSPORT_LIBRARIES_LIST};${FACEMGR_LIBRARY_LIST};${APPS_LIBRARY_LIST}") @@ -248,72 +251,85 @@ function(make_packages) set(CPACK_PACKAGE_VERSION_MINOR "${VERSION_MINOR}") set(CPACK_PACKAGE_VERSION_PATCH "${VERSION_REVISION}") set(CPACK_PACKAGE_INSTALL_DIRECTORY "hICN Components") + set(CPACK_COMPONENTS_ALL dependencies ${HICN_UTILS} ${HICN_LIGHT} ${HICN_APPS} ${FACEMGR} lib${LIBTRANSPORT} ${LIBTRANSPORT}-dev lib${LIBHICN} ${LIBHICN}-dev ${HICN_UTILS}-dev ${HICN_LIGHT}-dev ${HICN_APPS}-dev ${FACEMGR}-dev) set(CPACK_COMPONENT_DEPENDENCIES_DISPLAY_NAME "Dependencies") - if (HICN_UTILS) + if (NOT "${HICN_UTILS}" STREQUAL "") string(TOUPPER ${HICN_UTILS} HICN_UTILS_UPPERCASE) + string(TOUPPER ${HICN_UTILS}-dev HICN_UTILS_DEV_UPPERCASE) set(CPACK_COMPONENT_${HICN_UTILS_UPPERCASE}_DISPLAY_NAME "hICN utils") + set(CPACK_COMPONENT_${HICN_UTILS_DEV_UPPERCASE}_DISPLAY_NAME "hicn utils headers") set(CPACK_COMPONENT_${HICN_UTILS_UPPERCASE}_GROUP "Executables") + set(CPACK_COMPONENT_${HICN_UTILS_DEV_UPPERCASE}_GROUP "Headers") set(CPACK_COMPONENT_${HICN_UTILS_UPPERCASE}_INSTALL_TYPES Full) - set(CPACK_COMPONENT_${HICN_APPS_DEV_UPPERCASE}_DISPLAY_NAME "hicn-apps headers") - endif() - string(TOUPPER ${HICN_LIGHT} HICN_LIGHT_UPPERCASE) - if (HICN_APPS) + set(CPACK_COMPONENT_${HICN_UTILS_DEV_UPPERCASE}_INSTALL_TYPES Full) + endif () + + if (NOT "${HICN_LIGHT}" STREQUAL "") + string(TOUPPER ${HICN_LIGHT} HICN_LIGHT_UPPERCASE) + string(TOUPPER ${HICN_LIGHT}-dev HICN_LIGHT_DEV_UPPERCASE) + set(CPACK_COMPONENT_${HICN_LIGHT_UPPERCASE}_DISPLAY_NAME "hICN light apps") + set(CPACK_COMPONENT_${HICN_LIGHT_DEV_UPPERCASE}_DISPLAY_NAME "hicn-light headers") + set(CPACK_COMPONENT_${HICN_LIGHT_UPPERCASE}_GROUP "Executables") + set(CPACK_COMPONENT_${HICN_LIGHT_DEV_UPPERCASE}_GROUP "Headers") + set(CPACK_COMPONENT_${HICN_LIGHT_UPPERCASE}_INSTALL_TYPES Full) + set(CPACK_COMPONENT_${HICN_LIGHT_DEV_UPPERCASE}_INSTALL_TYPES Full) + endif () + + if (NOT "${HICN_APPS}" STREQUAL "") string(TOUPPER ${HICN_APPS} HICN_APPS_UPPERCASE) string(TOUPPER ${HICN_APPS}-dev HICN_APPS_DEV_UPPERCASE) set(CPACK_COMPONENT_${HICN_APPS_UPPERCASE}_DISPLAY_NAME "hICN apps") + set(CPACK_COMPONENT_${HICN_APPS_DEV_UPPERCASE}_DISPLAY_NAME "hicn-apps headers") + set(CPACK_COMPONENT_${HICN_APPS_UPPERCASE}_GROUP "Executables") set(CPACK_COMPONENT_${HICN_APPS_DEV_UPPERCASE}_GROUP "Headers") set(CPACK_COMPONENT_${HICN_APPS_UPPERCASE}_INSTALL_TYPES Full) set(CPACK_COMPONENT_${HICN_APPS_DEV_UPPERCASE}_INSTALL_TYPES Full) - endif() - if (FACEMGR) + endif () + + if (NOT "${FACEMGR}" STREQUAL "") string(TOUPPER ${FACEMGR} FACEMGR_UPPERCASE) string(TOUPPER ${FACEMGR}-dev FACEMGR_DEV_UPPERCASE) - set(CPACK_COMPONENT_${FACEMGR_DEV_UPPERCASE}_DISPLAY_NAME "facemgr headers") set(CPACK_COMPONENT_${FACEMGR_UPPERCASE}_DISPLAY_NAME "facemgr") + set(CPACK_COMPONENT_${FACEMGR_DEV_UPPERCASE}_DISPLAY_NAME "facemgr headers") set(CPACK_COMPONENT_${FACEMGR_UPPERCASE}_GROUP "Executables") set(CPACK_COMPONENT_${FACEMGR_DEV_UPPERCASE}_GROUP "Headers") set(CPACK_COMPONENT_${FACEMGR_UPPERCASE}_INSTALL_TYPES Full) set(CPACK_COMPONENT_${FACEMGR_DEV_UPPERCASE}_INSTALL_TYPES Full) - endif() - string(TOUPPER lib${LIBTRANSPORT} LIBTRANSPORT_UPPERCASE) - string(TOUPPER ${LIBTRANSPORT}-dev LIBTRANSPORT_DEV_UPPERCASE) - string(TOUPPER lib${LIBHICN} LIBHICN_UPPERCASE) - string(TOUPPER ${LIBHICN}-dev LIBHICN_DEV_UPPERCASE) - string(TOUPPER ${HICN_UTILS}-dev HICN_UTILS_DEV_UPPERCASE) - string(TOUPPER ${HICN_LIGHT}-dev HICN_LIGHT_DEV_UPPERCASE) - set(CPACK_COMPONENT_${HICN_LIGHT_UPPERCASE}_DISPLAY_NAME "hICN light apps") - set(CPACK_COMPONENT_${LIBTRANSPORT_UPPERCASE}_DISPLAY_NAME "libtransport libs") - set(CPACK_COMPONENT_${LIBHICN_UPPERCASE}_DISPLAY_NAME "hicn libs") - set(CPACK_COMPONENT_${LIBTRANSPORT_DEV_UPPERCASE}_DISPLAY_NAME "libtransport headers") - set(CPACK_COMPONENT_${LIBHICN_DEV_UPPERCASE}_DISPLAY_NAME "hicn headers") - set(CPACK_COMPONENT_${HICN_UTILS_DEV_UPPERCASE}_DISPLAY_NAME "hicn utils headers") - set(CPACK_COMPONENT_${HICN_LIGHT_DEV_UPPERCASE}_DISPLAY_NAME "hicn-light headers") + endif () + + if (NOT "${LIBTRANSPORT}" STREQUAL "") + string(TOUPPER lib${LIBTRANSPORT} LIBTRANSPORT_UPPERCASE) + string(TOUPPER ${LIBTRANSPORT}-dev LIBTRANSPORT_DEV_UPPERCASE) + set(CPACK_COMPONENT_${LIBTRANSPORT_UPPERCASE}_DISPLAY_NAME "libtransport libs") + set(CPACK_COMPONENT_${LIBTRANSPORT_DEV_UPPERCASE}_DISPLAY_NAME "libtransport headers") + set(CPACK_COMPONENT_${LIBTRANSPORT_UPPERCASE}_GROUP "Libraries") + set(CPACK_COMPONENT_${LIBTRANSPORT_DEV_UPPERCASE}_GROUP "Headers") + set(CPACK_COMPONENT_${LIBTRANSPORT_UPPERCASE}_INSTALL_TYPES Full) + set(CPACK_COMPONENT_${LIBTRANSPORT_DEV_UPPERCASE}_INSTALL_TYPES Full) + endif () + + if (NOT "${LIBHICN}" STREQUAL "") + string(TOUPPER lib${LIBHICN} LIBHICN_UPPERCASE) + string(TOUPPER ${LIBHICN}-dev LIBHICN_DEV_UPPERCASE) + set(CPACK_COMPONENT_${LIBHICN_UPPERCASE}_DISPLAY_NAME "hicn libs") + set(CPACK_COMPONENT_${LIBHICN_DEV_UPPERCASE}_DISPLAY_NAME "hicn headers") + set(CPACK_COMPONENT_${LIBHICN_UPPERCASE}_GROUP "Libraries") + set(CPACK_COMPONENT_${LIBHICN_DEV_UPPERCASE}_GROUP "Headers") + set(CPACK_COMPONENT_${LIBHICN_UPPERCASE}_INSTALL_TYPES Full) + set(CPACK_COMPONENT_${LIBHICN_DEV_UPPERCASE}_INSTALL_TYPES Full) + endif () + set (CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/cmake/Modules/License.txt") set(CPACK_COMPONENT_DEPENDENCIES_DESCRIPTION "All dependency libreries") - set(CPACK_COMPONENT_${HICN_LIGHT_UPPERCASE}_GROUP "Executables") - set(CPACK_COMPONENT_${HICN_APPS_UPPERCASE}_GROUP "Executables") - set(CPACK_COMPONENT_${LIBTRANSPORT_UPPERCASE}_GROUP "Libraries") - set(CPACK_COMPONENT_${LIBHICN_UPPERCASE}_GROUP "Libraries") - set(CPACK_COMPONENT_${LIBTRANSPORT_DEV_UPPERCASE}_GROUP "Headers") - set(CPACK_COMPONENT_${LIBHICN_DEV_UPPERCASE}_GROUP "Headers") - set(CPACK_COMPONENT_${HICN_UTILS_DEV_UPPERCASE}_GROUP "Headers") - set(CPACK_COMPONENT_${HICN_LIGHT_DEV_UPPERCASE}_GROUP "Headers") set(CPACK_COMPONENT_DEPENDENCIES_GROUP "Dependencies") set(CPACK_COMPONENT_GROUP_DEVELOPMENT_EXPANDED ON) set(CPACK_COMPONENT_GROUP_DEPENDENCIES_DESCRIPTION "All dependency libreries") set(CPACK_ALL_INSTALL_TYPES Full Developer) set(CPACK_INSTALL_TYPE_FULL_DISPLAY_NAME "Everything") - set(CPACK_COMPONENT_${HICN_LIGHT_UPPERCASE}_INSTALL_TYPES Full) - set(CPACK_COMPONENT_${LIBTRANSPORT_UPPERCASE}_INSTALL_TYPES Full) - set(CPACK_COMPONENT_${LIBHICN_UPPERCASE}_INSTALL_TYPES Full) - set(CPACK_COMPONENT_${LIBTRANSPORT_DEV_UPPERCASE}_INSTALL_TYPES Full) - set(CPACK_COMPONENT_${LIBHICN_DEV_UPPERCASE}_INSTALL_TYPES Full) - set(CPACK_COMPONENT_${HICN_UTILS_DEV_UPPERCASE}_INSTALL_TYPES Full) - set(CPACK_COMPONENT_${HICN_LIGHT_DEV_UPPERCASE}_INSTALL_TYPES Full) if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") set(CMAKE_INSTALL_RPATH /opt/hicn) |