From fd8240669b52be4e18fff1ce30744e6b4c8a06aa Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Wed, 25 Feb 2015 10:39:44 -0800 Subject: [PATCH] fix for windeployqt for executables --- .../CopyDllsBesideWindowsExecutable.cmake | 27 +++++++++++++------ tools/scribe/CMakeLists.txt | 2 +- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/cmake/macros/CopyDllsBesideWindowsExecutable.cmake b/cmake/macros/CopyDllsBesideWindowsExecutable.cmake index 4f144c4315..61d35d93b1 100644 --- a/cmake/macros/CopyDllsBesideWindowsExecutable.cmake +++ b/cmake/macros/CopyDllsBesideWindowsExecutable.cmake @@ -10,6 +10,13 @@ # macro(COPY_DLLS_BESIDE_WINDOWS_EXECUTABLE) + + if (NOT ${ARGN}) + set(USES_QT TRUE) + else () + set(USES_QT ${ARGN}) + endif () + if (WIN32) configure_file( @@ -27,14 +34,18 @@ macro(COPY_DLLS_BESIDE_WINDOWS_EXECUTABLE) -P ${CMAKE_CURRENT_BINARY_DIR}/FixupBundlePostBuild.cmake ) - find_program(${WINDEPLOYQT_COMMAND} windeployqt PATHS ${QT_DIR}/bin NO_DEFAULT_PATH) + if (NOT USES_QT) + + 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 CMD /C "SET PATH=%PATH%;${QT_DIR}/bin && ${WINDEPLOYQT_COMMAND} --no-libraries $" + ) + + endif () - # 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 diff --git a/tools/scribe/CMakeLists.txt b/tools/scribe/CMakeLists.txt index bc07fec230..4196909043 100755 --- a/tools/scribe/CMakeLists.txt +++ b/tools/scribe/CMakeLists.txt @@ -1,4 +1,4 @@ set(TARGET_NAME scribe) setup_hifi_project() -copy_dlls_beside_windows_executable() \ No newline at end of file +copy_dlls_beside_windows_executable(false) \ No newline at end of file