diff options
Diffstat (limited to 'gui/CMakeLists.txt')
-rw-r--r-- | gui/CMakeLists.txt | 14 |
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) |