diff --git a/gui/gui.pro b/gui/gui.pro index b1c93d11e..8800ee439 100644 --- a/gui/gui.pro +++ b/gui/gui.pro @@ -103,8 +103,18 @@ contains(LINKCORE, [yY][eE][sS]) { include($$PWD/../lib/lib.pri) } -CONFIG += precompile_header -PRECOMPILED_HEADER = precompiled_qmake.h +win32-msvc* { + MSVC_VER = $$(VisualStudioVersion) + message($$MSVC_VER) + MSVC_VER_SPLIT = $$split(MSVC_VER, .) + MSVC_VER_MAJOR = $$first(MSVC_VER_SPLIT) + # doesn't compile with older VS versions - assume VS2019 (16.x) is the first working for now + !lessThan(MSVC_VER_MAJOR, 16) { + message("using precompiled header") + CONFIG += precompile_header + PRECOMPILED_HEADER = precompiled_qmake.h + } +} HEADERS += aboutdialog.h \ application.h \