diff --git a/cmake/package_plugin.cmake b/cmake/package_plugin.cmake index 65c8c5d68e7..e45ca525df3 100644 --- a/cmake/package_plugin.cmake +++ b/cmake/package_plugin.cmake @@ -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)