fix compiler warning for windows

This commit is contained in:
merlokk 2017-10-19 14:11:51 +03:00
commit 11ba38764d

View file

@ -4,6 +4,13 @@
# the license. # the license.
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# OS detection
ifeq ($(OS),Windows_NT)
detected_OS := Windows
else
detected_OS := $(shell sh -c 'uname -s 2>/dev/null || echo not')
endif
CC = gcc CC = gcc
CXX = g++ CXX = g++
LD = g++ LD = g++
@ -49,7 +56,11 @@ ifeq ($(QTINCLUDES), )
MOC = $(shell pkg-config --variable=moc_location QtCore) MOC = $(shell pkg-config --variable=moc_location QtCore)
UIC = $(shell pkg-config --variable=uic_location QtCore) UIC = $(shell pkg-config --variable=uic_location QtCore)
else else
ifeq ($(detected_OS),Windows)
CXXFLAGS += -std=c++11
else
CXXFLAGS += -std=c++11 -fPIC CXXFLAGS += -std=c++11 -fPIC
endif
endif endif
ifeq ($(QTINCLUDES), ) ifeq ($(QTINCLUDES), )
# if both pkg-config commands failed, search in common places # if both pkg-config commands failed, search in common places
@ -59,8 +70,12 @@ ifeq ($(QTINCLUDES), )
ifneq ($(wildcard $(QTDIR)/include/QtWidgets),) ifneq ($(wildcard $(QTDIR)/include/QtWidgets),)
QTINCLUDES += -I$(QTDIR)/include/QtWidgets QTINCLUDES += -I$(QTDIR)/include/QtWidgets
QTLDLIBS = -L$(QTDIR)/lib -lQt5Widgets -lQt5Gui -lQt5Core QTLDLIBS = -L$(QTDIR)/lib -lQt5Widgets -lQt5Gui -lQt5Core
ifeq ($(detected_OS),Windows)
CXXFLAGS += -std=c++11
else
CXXFLAGS += -std=c++11 -fPIC CXXFLAGS += -std=c++11 -fPIC
endif endif
endif
MOC = $(QTDIR)/bin/moc MOC = $(QTDIR)/bin/moc
UIC = $(QTDIR)/bin/uic UIC = $(QTDIR)/bin/uic
endif endif