From 66253e142bfcd58f614b57c20d6c91845e5ba5d2 Mon Sep 17 00:00:00 2001 From: Janek Bevendorff Date: Thu, 26 Jan 2017 20:08:53 +0100 Subject: [PATCH] Install qwindows platform abstraction plugin on Windows --- src/CMakeLists.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b843de85..69af4359 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -258,9 +258,10 @@ if(APPLE) endif() if(MINGW) + string(REPLACE "AMD" "Win" OUTPUT_FILE_POSTFIX "${CMAKE_HOST_SYSTEM_PROCESSOR}") set(CPACK_GENERATOR "ZIP;NSIS") set(CPACK_STRIP_FILES ON) - set(CPACK_PACKAGE_FILE_NAME "${PROGNAME}-${KEEPASSXC_VERSION}") + set(CPACK_PACKAGE_FILE_NAME "${PROGNAME}-${KEEPASSXC_VERSION}-${OUTPUT_FILE_POSTFIX}") set(CPACK_PACKAGE_INSTALL_DIRECTORY ${PROGNAME}) set(CPACK_PACKAGE_VERSION ${KEEPASSXC_VERSION}) set(CPACK_PACKAGE_VENDOR "${PROGNAME} Team") @@ -278,5 +279,9 @@ if(MINGW) " COMPONENT Runtime) include(DeployQt4) - install_qt4_executable(${PROGNAME}.exe "qjpeg;qgif;qico;qtaccessiblewidgets") + install_qt4_executable(${PROGNAME}.exe) + add_custom_command(TARGET ${PROGNAME} POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${Qt5Core_DIR}/../../../share/qt5/plugins/platforms/qwindows$<$:d>.dll + $) + install(FILES $/qwindows$<$:d>.dll DESTINATION "platforms") endif()