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