summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-08-25 09:19:38 +0200
committerStanislaw Halik <sthalik@misaki.pl>2016-08-25 09:19:38 +0200
commit07198741023a62243f769bcd92aa2a168e884fe7 (patch)
tree97778f98b8f4b606329e08163cdc8dcfaf4601a4
parentc313f890dd25b49aa349f2b12fc617142a8160ef (diff)
gui: add fixups for qt5 .dll's in msvc build
-rw-r--r--gui/CMakeLists.txt14
1 files changed, 14 insertions, 0 deletions
diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt
index 92f413a2..94493696 100644
--- a/gui/CMakeLists.txt
+++ b/gui/CMakeLists.txt
@@ -29,3 +29,17 @@ if(LINUX)
# for process detector
target_link_libraries(opentrack procps)
endif()
+
+add_custom_target(fixup-qt-subsystem)
+
+if(MSVC)
+ foreach(i Qt5Core Qt5Gui Qt5Network Qt5SerialPort Qt5Widgets platforms/qwindows)
+ add_custom_command(TARGET fixup-qt-subsystem
+ POST_BUILD
+ COMMAND editbin -nologo -SUBSYSTEM:WINDOWS,5.01 -OSVERSION:5.1 "${i}.dll"
+ WORKING_DIRECTORY "${CMAKE_INSTALL_PREFIX}"
+ COMMENT "Fixing up Windows XP support for ${i}.dll")
+ endforeach()
+endif()
+
+add_dependencies(opentrack fixup-qt-subsystem)