From e58c712c9e48eb5af960fa8d4ac79889d54359b1 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Fri, 30 Jan 2015 15:23:01 +0100 Subject: [PATCH] ADD: a switch to detect if Qt4 or Qt5 is used. --- client/Makefile | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/client/Makefile b/client/Makefile index 823ee445..46fa3b2a 100644 --- a/client/Makefile +++ b/client/Makefile @@ -37,6 +37,15 @@ LDLIBS += -ldl LUAPLATFORM = linux endif +# QT version, 4 or 5 +qtplatform = $(shell $(MOC) -v) +ifneq (, $(findstring moc 5,$(qtplatform))) + CXXFLAGS = -I$(QTDIR)/include -I$(QTDIR)/include/QtCore -I$(QTDIR)/include/QtGui -I$(QTDIR)/include/QtWidgets -I/mingw/include + QTLDLIBS = -L$(QTDIR)/lib -lQt5Core -lQt5Gui -lQt5Widgets +else + CXXFLAGS = -I$(QTDIR)/include -I$(QTDIR)/include/QtCore -I$(QTDIR)/include/QtGui + QTLDLIBS = -L$(QTDIR)/lib -lQtCore4 -lQtGui4 +endif ifneq ($(QTLDLIBS),) QTGUI = $(OBJDIR)/proxgui.o $(OBJDIR)/proxguiqt.o $(OBJDIR)/proxguiqt.moc.o -- 2.39.5