Signed-off-by: Yuhang Zhao <2546789017@qq.com>
This commit is contained in:
Yuhang Zhao 2023-01-27 15:54:54 +08:00
parent c0d5395e0e
commit b6f573e08c
1 changed files with 9 additions and 1 deletions

View File

@ -553,7 +553,15 @@ function(deploy_qt_runtime)
elseif(UNIX)
# TODO
endif()
file(WRITE "$<TARGET_FILE_DIR:${DEPLOY_ARGS_TARGET}>/qt.conf" "[Paths]\nPrefix = ..\n")
set(__location)
get_target_property(__location ${DEPLOY_ARGS_TARGET} LOCATION)
if(__location)
set(__dir)
cmake_path(GET __location PARENT_PATH __dir)
if(__dir)
file(WRITE "${__dir}/qt.conf" "[Paths]\nPrefix = ..\n")
endif()
endif()
if(NOT DEPLOY_ARGS_NO_INSTALL)
include(GNUInstallDirs)
install(TARGETS ${DEPLOY_ARGS_TARGET}