From 0da6e0ea9627ff43b7a6f69984b71ce3de269508 Mon Sep 17 00:00:00 2001 From: "Bill(Shuzhou) Liu" Date: Tue, 18 Jan 2022 10:53:20 -0500 Subject: [PATCH] Add license file to smi-lib package Install LICENSE.txt to share/doc/smi-lib Change-Id: Idcbb70db8808111203e8e4a4c3ab4d1e070ac79d --- CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b779d4ca..80e92c24 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,6 +14,10 @@ endif() ## Include common cmake modules include(utils) +if (NOT DEFINED CPACK_RESOURCE_FILE_LICENSE) + set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/License.txt") +endif() + set(ROCM_SMI "rocm_smi") set(ROCM_SMI_COMPONENT "lib${ROCM_SMI}") set(ROCM_SMI_TARGET "${ROCM_SMI}64") @@ -170,7 +174,8 @@ install(FILES install(EXPORT rocm_smiTargets DESTINATION "${ROCM_SMI}/lib/cmake" COMPONENT dev) - +#License file +install( FILES ${CPACK_RESOURCE_FILE_LICENSE} DESTINATION share/doc/smi-lib RENAME LICENSE.txt) ########################### # Packaging directives