Get the name of moc,uic,rcc from the .pc files in Qt 4

Just in case some crazy distributions also rename the binaries.

Renaming the binaries is not supported in Qt 5 and should never be
done. Besides, the binary names are missing from Qt 5.0.

Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Thiago Macieira 2013-05-14 15:23:40 -06:00 committed by Dirk Hohndel
parent 2ba236e288
commit 18e5155ba5

View file

@ -86,10 +86,16 @@ ifeq ($(QT_VERSION_MAJOR), 5)
QT_MODULES = Qt5Widgets Qt5Svg
QT_CORE = Qt5Core
QTBINDIR = $(shell $(QMAKE) -query QT_HOST_BINS)
# Tool paths are not stored in .pc files in Qt 5.0
MOC = $(QTBINDIR)/moc
UIC = $(QTBINDIR)/uic
RCC = $(QTBINDIR)/rcc
else
QT_MODULES = QtGui QtSvg
QT_CORE = QtCore
QTBINDIR = $(shell $(QMAKE) -query QT_INSTALL_BINS)
MOC = $(shell $(PKGCONFIG) --variable=moc_location QtCore)
UIC = $(shell $(PKGCONFIG) --variable=uic_location QtGui)
RCC = $(shell $(PKGCONFIG) --variable=rcc_location QtGui)
endif
# we need GLIB2CFLAGS for gettext
@ -98,9 +104,6 @@ LIBQT = $(shell $(PKGCONFIG) --libs $(QT_MODULES))
ifneq ($(filter reduce_relocations, $(shell $(PKGCONFIG) --variable qt_config $(QT_CORE))), )
QTCXXFLAGS += -fPIE
endif
MOC = $(QTBINDIR)/moc
UIC = $(QTBINDIR)/uic
RCC = $(QTBINDIR)/rcc
LIBGTK = $(shell $(PKGCONFIG) --libs gtk+-2.0 glib-2.0)
ifneq (,$(filter $(UNAME),linux kfreebsd gnu))