From ec3d720303b6d7d8c8a73da7db42a23107dc3a32 Mon Sep 17 00:00:00 2001 From: "Jonathan R. Madsen" Date: Thu, 25 Apr 2024 16:04:09 -0500 Subject: [PATCH] Fix CPACK_RPM_PACKAGE_LICENSE (#63) - move install command for license to rocprofiler_register_config_install.cmake - CPACK_RPM_PACKAGE_LICENSE should be set to license type (i.e. "MIT"), not the path to the license file [ROCm/rocprofiler-register commit: 11a4668306e91d347d4343d421f7d524b9d3b0df] --- .../cmake/rocprofiler_register_config_install.cmake | 5 +++++ .../cmake/rocprofiler_register_config_packaging.cmake | 9 +-------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/projects/rocprofiler-register/cmake/rocprofiler_register_config_install.cmake b/projects/rocprofiler-register/cmake/rocprofiler_register_config_install.cmake index d7493d9b47..1a5e69156a 100644 --- a/projects/rocprofiler-register/cmake/rocprofiler_register_config_install.cmake +++ b/projects/rocprofiler-register/cmake/rocprofiler_register_config_install.cmake @@ -3,6 +3,11 @@ include_guard(GLOBAL) include(CMakePackageConfigHelpers) +install( + FILES ${PROJECT_SOURCE_DIR}/LICENSE + DESTINATION ${CMAKE_INSTALL_DOCDIR} + COMPONENT core) + install( EXPORT rocprofiler-register-library-targets FILE rocprofiler-register-library-targets.cmake diff --git a/projects/rocprofiler-register/cmake/rocprofiler_register_config_packaging.cmake b/projects/rocprofiler-register/cmake/rocprofiler_register_config_packaging.cmake index ea7b8fb4d4..5e98f3e53a 100644 --- a/projects/rocprofiler-register/cmake/rocprofiler_register_config_packaging.cmake +++ b/projects/rocprofiler-register/cmake/rocprofiler_register_config_packaging.cmake @@ -75,14 +75,6 @@ else() set(CPACK_RPM_PACKAGE_REQUIRES "") endif() -set(CPACK_RPM_PACKAGE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE") - -# Install license file -install( - FILES ${CPACK_RESOURCE_FILE_LICENSE} - DESTINATION ${CMAKE_INSTALL_DOCDIR} - COMPONENT core) - foreach(COMPONENT_GROUP ${ROCPROFILER_REGISTER_COMPONENT_GROUPS}) set(_SEP "${COMPONENT_SEP_${COMPONENT_GROUP}}") set(_DEP "${COMPONENT_DEP_${COMPONENT_GROUP}}") @@ -188,6 +180,7 @@ if(CPACK_RPM_PACKAGE_RELEASE) set(CPACK_RPM_PACKAGE_RELEASE_DIST ON) endif() set(CPACK_RPM_FILE_NAME "RPM-DEFAULT") +set(CPACK_RPM_PACKAGE_LICENSE "MIT") # -------------------------------------------------------------------------------------- # #