From f4f618484d8fb6f837ed301fdfb97fe890b28a4e Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 15 Mar 2014 19:34:16 +0000 Subject: [PATCH] Fix build on archlinux when qt4 and qt5 are both installed --- source/Makefile.mk | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/source/Makefile.mk b/source/Makefile.mk index 6121bf4c5..51e5e8cdf 100644 --- a/source/Makefile.mk +++ b/source/Makefile.mk @@ -377,9 +377,16 @@ UIC_QT4 ?= $(shell pkg-config --variable=uic_location QtCore) endif ifeq ($(HAVE_QT5),true) -MOC_QT5 ?= $(shell pkg-config --variable=libdir Qt5Core)/qt5/bin/moc -RCC_QT5 ?= $(shell pkg-config --variable=libdir Qt5Core)/qt5/bin/rcc -UIC_QT5 ?= $(shell pkg-config --variable=libdir Qt5Core)/qt5/bin/uic +QT5_LIBDIR = $(shell pkg-config --variable=libdir Qt5Core) +ifneq (,$(wildcard $(QT5_LIBDIR)/qt5/bin/moc)) +MOC_QT5 ?= $(QT5_LIBDIR)/qt5/bin/moc +RCC_QT5 ?= $(QT5_LIBDIR)/qt5/bin/rcc +UIC_QT5 ?= $(QT5_LIBDIR)/qt5/bin/uic +else +MOC_QT5 ?= $(QT5_LIBDIR)/qt/bin/moc +RCC_QT5 ?= $(QT5_LIBDIR)/qt/bin/rcc +UIC_QT5 ?= $(QT5_LIBDIR)/qt/bin/uic +endif endif # --------------------------------------------------------------