!49420 refactor cmake codes that supported since cmake3.21

Merge pull request !49420 from zhoufeng/debuginfo-for-plugin
This commit is contained in:
i-robot 2023-02-27 03:28:24 +00:00 committed by Gitee
commit d303373798
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 5 additions and 6 deletions

View File

@ -114,12 +114,11 @@ if(ENABLE_AKG AND CMAKE_SYSTEM_NAME MATCHES "Linux")
endif()
if(ENABLE_SYM_FILE)
set(CPACK_CUSTOM_INSTALL_VARIABLES)
list(APPEND CPACK_CUSTOM_INSTALL_VARIABLES MS_PACK_ROOT_DIR=${CPACK_PACKAGE_DIRECTORY})
list(APPEND CPACK_CUSTOM_INSTALL_VARIABLES
MS_INSTALL_DIR=${CPACK_PACKAGE_DIRECTORY}/_CPack_Packages/${CMAKE_HOST_SYSTEM_NAME}/${CPACK_GENERATOR})
list(APPEND CPACK_CUSTOM_INSTALL_VARIABLES MS_PACKAGE_FILE_NAME=${CPACK_PACKAGE_FILE_NAME})
install(SCRIPT ${CMAKE_SOURCE_DIR}/cmake/plugin_debuginfo_script.cmake)
install(CODE "\
execute_process(COMMAND ${CMAKE_COMMAND} -DMS_PACK_ROOT_DIR=${CPACK_PACKAGE_DIRECTORY} \
-DMS_INSTALL_DIR=${CPACK_PACKAGE_DIRECTORY}/_CPack_Packages/${CMAKE_HOST_SYSTEM_NAME}/${CPACK_GENERATOR} \
-DMS_PACKAGE_FILE_NAME=${CPACK_PACKAGE_FILE_NAME} -P${CMAKE_SOURCE_DIR}/cmake/plugin_debuginfo_script.cmake)"
)
endif()
include(CPack)