separate the C compiler flags and C++ compiler flags where needed

This commit is contained in:
nhmall
2021-02-05 09:45:03 -05:00
parent f8785792bd
commit 769b8877fc
5 changed files with 24 additions and 38 deletions

View File

@@ -115,14 +115,6 @@ endif # WANT_WIN_X11
ifdef WANT_WIN_QT
# Qt5 requires C++11
LINK = $(CXX)
QTCXXFLAGS += -Wno-deprecated-declarations
ifeq "$(CCISCLANG)" ""
# get the version of g++
GPPGTEQ9 := $(shell expr `$(CXX) -dumpversion | cut -f1 -d.` \>= 9)
ifeq "$(GPPGTEQ9)" "1"
QTCXXFLAGS+= -Wno-format-truncation
endif #g++ version greater than or equal to 9
endif #not clang
QTCXXFLAGS += $(sort $(shell PKG_CONFIG_PATH=$(QTDIR)/lib/pkgconfig pkg-config Qt5Gui Qt5Widgets Qt5Multimedia --cflags))
QTCXXFLAGS += -fPIC
WINLIB += $(shell PKG_CONFIG_PATH=$(QTDIR)/lib/pkgconfig pkg-config Qt5Gui Qt5Widgets Qt5Multimedia --libs)