From 9019270df8e8fa4ce3fa81e4281b027e2ac1b640 Mon Sep 17 00:00:00 2001 From: Vasily Date: Sun, 17 Feb 2019 20:28:56 +0100 Subject: [PATCH] Refine compiler system includes for different platforms MSVC seems to be the only platform that doesn't have a non-experimental way to include files that don't give warnings. --- build_scripts/qt/sources.pri | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/build_scripts/qt/sources.pri b/build_scripts/qt/sources.pri index 9f861f6..ff02bf9 100644 --- a/build_scripts/qt/sources.pri +++ b/build_scripts/qt/sources.pri @@ -46,13 +46,23 @@ win32 { src/tabcontrollers/audiomanager/IPolicyConfig.h \ src/tabcontrollers/keyboardinput/KeyboardInputWindows.h } -*msvc* { + +win32-msvc { INCLUDEPATH += third-party/openvr/headers \ third-party/easylogging++ - #easylogging++ used to be a header only lib. Now requires easylogging++.cc - SOURCES += third-party/easylogging++/easylogging++.cc -} else { +} + +win32-clang-msvc { + QMAKE_CXXFLAGS += /imsvc "$$PWD/../../third-party/openvr/headers" + QMAKE_CXXFLAGS += /imsvc "$$PWD/../../third-party/easylogging++" +} + +# Anything g++ or clang +# In order to suppress warnings in third party headers +*clang|*clang-g++|*clang-libc++|*g++* { QMAKE_CXXFLAGS += -isystem ../third-party/openvr/headers QMAKE_CXXFLAGS += -isystem ../third-party/easylogging++ - SOURCES += third-party/easylogging++/easylogging++.cc } + +# easylogging++ used to be a header only lib. Now requires easylogging++.cc +SOURCES += third-party/easylogging++/easylogging++.cc