mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2026-11-26 03:46:49 -08:00
Fix running windeployqt for Qt6 (#13356)
--------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: droidmonkey <[email protected]>
This commit is contained in:
1 file changed
+24
-6
+24
-6
@@ -452,7 +452,10 @@ install(TARGETS ${PROGNAME}
|
||||
if(WIN32)
|
||||
# Deploy used libraries into build directory for debugging
|
||||
add_custom_command(TARGET ${PROGNAME} POST_BUILD
|
||||
COMMAND ${WINDEPLOYQT_EXE} --dir $<TARGET_FILE_DIR:${PROGNAME}> $<TARGET_FILE:${PROGNAME}>)
|
||||
COMMAND ${WINDEPLOYQT_EXE}
|
||||
--dir $<TARGET_FILE_DIR:${PROGNAME}>
|
||||
$<IF:$<CONFIG:Debug>,--debug,--release>
|
||||
$<TARGET_FILE:${PROGNAME}>)
|
||||
|
||||
# We have to copy the license file in the configuration phase.
|
||||
# CMake checks that CPACK_RESOURCE_FILE_LICENSE actually exists and
|
||||
@@ -471,7 +474,7 @@ if(WIN32)
|
||||
set(CPACK_GENERATOR "ZIP;WIX")
|
||||
set(CPACK_COMPONENTS_ALL "")
|
||||
set(CPACK_STRIP_FILES OFF)
|
||||
set(CPACK_PACKAGE_FILE_NAME "${PROGNAME}-${KEEPASSXC_VERSION}-${OUTPUT_FILE_POSTFIX}")
|
||||
set(CPACK_PACKAGE_FILE_NAME "${PROGNAME}-${KEEPASSXC_VERSION}-${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}")
|
||||
set(CPACK_PACKAGE_INSTALL_DIRECTORY ${PROGNAME})
|
||||
set(CPACK_PACKAGE_VERSION ${KEEPASSXC_VERSION_CLEAN})
|
||||
set(CPACK_PACKAGE_VENDOR "${PROGNAME} Team")
|
||||
@@ -507,6 +510,25 @@ if(WIN32)
|
||||
set(CPACK_WIX_EXTENSIONS "WixUtilExtension.dll")
|
||||
include(CPack)
|
||||
|
||||
|
||||
# Use windeployqt.exe to setup Qt dependencies
|
||||
install(CODE "
|
||||
if(\"\${CMAKE_INSTALL_CONFIG_NAME}\" STREQUAL \"Debug\")
|
||||
set(_wdqt_mode --debug)
|
||||
else()
|
||||
set(_wdqt_mode --release)
|
||||
endif()
|
||||
execute_process(
|
||||
COMMAND ${WINDEPLOYQT_EXE} ${PROGNAME}.exe \${_wdqt_mode}
|
||||
WORKING_DIRECTORY \${CMAKE_INSTALL_PREFIX}
|
||||
OUTPUT_QUIET
|
||||
RESULT_VARIABLE _wdqt_result
|
||||
)
|
||||
if(NOT \${_wdqt_result} EQUAL 0)
|
||||
message(FATAL_ERROR \"windeployqt failed with exit code \${_wdqt_result}\")
|
||||
endif()"
|
||||
COMPONENT Runtime)
|
||||
|
||||
if(NOT VCPKG_INSTALLED_DIR)
|
||||
install(CODE "set(gp_tool \"objdump\")" COMPONENT Runtime)
|
||||
|
||||
@@ -515,10 +537,6 @@ if(WIN32)
|
||||
fixup_bundle(\"\${CMAKE_INSTALL_PREFIX}/${PROGNAME}.exe\" \"\" \"\")"
|
||||
COMPONENT Runtime)
|
||||
|
||||
# Use windeployqt.exe to setup Qt dependencies
|
||||
install(CODE "execute_process(COMMAND ${WINDEPLOYQT_EXE} ${PROGNAME}.exe ${WINDEPLOYQT_MODE} WORKING_DIRECTORY \${CMAKE_INSTALL_PREFIX} OUTPUT_QUIET)"
|
||||
COMPONENT Runtime)
|
||||
|
||||
# install OpenSSL library
|
||||
if(KPXC_FEATURE_NETWORK)
|
||||
find_file(OPENSSL_DLL
|
||||
|
||||
Reference in new issue
Block a user