From 702da3a679c687b558cc7ab11c054fa12d67d625 Mon Sep 17 00:00:00 2001 From: David Galiffi Date: Thu, 5 Sep 2024 15:47:16 -0400 Subject: [PATCH] Install the LICENSE file to ${CMAKE_INSTALL_DOCDIR} (#377) * Install the LICENSE file to ${CMAKE_INSTALL_DOCDIR} ie., {INSTALL_PREFIX}/share/doc/omnitrace/LICENSE Internal ticket: SWDEV-466385 Signed-off-by: David Galiffi * Add CPACK_RPM_PACKAGE_LICENSE = "MIT" Signed-off-by: David Galiffi --------- Signed-off-by: David Galiffi --- CMakeLists.txt | 6 ++++++ cmake/ConfigCPack.cmake | 1 + 2 files changed, 7 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8ac627bb3..d6f8d6c59 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -395,6 +395,12 @@ install( DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/modulefiles/${PROJECT_NAME} COMPONENT setup) +install( + FILES + ${PROJECT_SOURCE_DIR}/LICENSE + DESTINATION ${CMAKE_INSTALL_DOCDIR} + COMPONENT setup) + # ------------------------------------------------------------------------------# # # install diff --git a/cmake/ConfigCPack.cmake b/cmake/ConfigCPack.cmake index 5f8ecbbe3..82c354b51 100644 --- a/cmake/ConfigCPack.cmake +++ b/cmake/ConfigCPack.cmake @@ -214,6 +214,7 @@ set(CPACK_RPM_PACKAGE_PROVIDES "${CPACK_RPM_PACKAGE_PROVIDES}" CACHE STRING "RPM package provides" FORCE) +set(CPACK_RPM_PACKAGE_LICENSE "MIT") set(CPACK_RPM_FILE_NAME "RPM-DEFAULT") set(CPACK_RPM_PACKAGE_RELEASE_DIST ON) set(CPACK_RPM_PACKAGE_AUTOREQPROV ON)