From bce85af456fee5fd400e76ca8985b0870190916d Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 9 Oct 2022 16:00:54 +0100 Subject: [PATCH] Alternative approach to qt5 tools setup --- source/Makefile.deps.mk | 14 ++++++++++---- source/frontend/Makefile | 8 ++++---- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/source/Makefile.deps.mk b/source/Makefile.deps.mk index 38dbcf053..189154ac2 100644 --- a/source/Makefile.deps.mk +++ b/source/Makefile.deps.mk @@ -292,24 +292,30 @@ endif ifeq ($(HAVE_QT5),true) QT5_HOSTBINS = $(shell $(PKG_CONFIG) --variable=host_bins Qt5Core) +else ifeq ($(HAVE_QT5PKG),true) +QT5_HOSTBINS = $(shell $(PKG_CONFIG) --variable=prefix Qt5OpenGLExtensions)/bin +endif + MOC_QT5 ?= $(QT5_HOSTBINS)/moc RCC_QT5 ?= $(QT5_HOSTBINS)/rcc UIC_QT5 ?= $(QT5_HOSTBINS)/uic + ifeq (,$(wildcard $(MOC_QT5))) HAVE_QT5 = false endif ifeq (,$(wildcard $(RCC_QT5))) HAVE_QT5 = false endif +ifeq (,$(wildcard $(UIC_QT5))) +HAVE_QT5 = false endif ifeq ($(HAVE_QT4),true) HAVE_QT = true -endif -ifeq ($(HAVE_QT5),true) +else ifeq ($(HAVE_QT5),true) HAVE_QT = true -endif -ifeq ($(WINDOWS),true) +# FIXME +else ifeq ($(WINDOWS),true) HAVE_QT = true endif diff --git a/source/frontend/Makefile b/source/frontend/Makefile index 5a67cdc26..5db4d9c82 100644 --- a/source/frontend/Makefile +++ b/source/frontend/Makefile @@ -21,11 +21,11 @@ QT5_LINK_FLAGS = $(LINK_FLAGS) endif ifeq ($(HAVE_QT5),true) -QT5_PREFIX = $(shell pkg-config --variable=prefix Qt5Core) -BUILD_CXX_FLAGS += $(shell pkg-config --cflags Qt5Core Qt5Gui Qt5Widgets) -QT5_LINK_FLAGS += -Wl,-rpath,$(QT5_PREFIX)/lib $(shell pkg-config --libs Qt5Core Qt5Gui Qt5Widgets) +QT5_PREFIX = $(shell $(PKG_CONFIG) --variable=prefix Qt5Core) +BUILD_CXX_FLAGS += $(shell $(PKG_CONFIG) --cflags Qt5Core Qt5Gui Qt5Widgets) +QT5_LINK_FLAGS += -Wl,-rpath,$(QT5_PREFIX)/lib $(shell $(PKG_CONFIG) --libs Qt5Core Qt5Gui Qt5Widgets) else ifeq ($(HAVE_QT5PKG),true) -QT5_PREFIX = $(shell pkg-config --variable=prefix Qt5OpenGLExtensions) +QT5_PREFIX = $(shell $(PKG_CONFIG) --variable=prefix Qt5OpenGLExtensions) BUILD_CXX_FLAGS += -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB -I $(QT5_PREFIX)/include/qt5 QT5_LINK_FLAGS += -Wl,-rpath,$(QT5_PREFIX)/lib -F $(QT5_PREFIX)/lib -framework QtCore -framework QtGui -framework QtWidgets else