From d52ba5e95870f07cd6b4e3e23024b222cc0576d4 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Tue, 24 Feb 2015 13:20:17 -0800 Subject: [PATCH] call windeployqt after fixup_bundle for qt plugins --- cmake/macros/CopyDllsBesideWindowsExecutable.cmake | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/cmake/macros/CopyDllsBesideWindowsExecutable.cmake b/cmake/macros/CopyDllsBesideWindowsExecutable.cmake index 4a1bc35fb7..4f144c4315 100644 --- a/cmake/macros/CopyDllsBesideWindowsExecutable.cmake +++ b/cmake/macros/CopyDllsBesideWindowsExecutable.cmake @@ -18,7 +18,7 @@ macro(COPY_DLLS_BESIDE_WINDOWS_EXECUTABLE) @ONLY ) - # add a post-build command to copy DLLs beside the interface executable + # add a post-build command to copy DLLs beside the executable add_custom_command( TARGET ${TARGET_NAME} POST_BUILD @@ -26,5 +26,15 @@ macro(COPY_DLLS_BESIDE_WINDOWS_EXECUTABLE) -DBUNDLE_EXECUTABLE=$ -P ${CMAKE_CURRENT_BINARY_DIR}/FixupBundlePostBuild.cmake ) + + find_program(${WINDEPLOYQT_COMMAND} windeployqt PATHS ${QT_DIR}/bin NO_DEFAULT_PATH) + + # add a post-build command to call windeployqt to copy Qt plugins + add_custom_command( + TARGET ${TARGET_NAME} + POST_BUILD + COMMAND SET PATH=%PATH%;${QT_DIR}/bin + COMMAND ${WINDEPLOYQT_COMMAND} --no-libraries --force $ + ) endif () endmacro() \ No newline at end of file