Browse Source

Alternative approach to qt5 tools setup

pull/1689/head
falkTX 2 years ago
parent
commit
bce85af456
2 changed files with 14 additions and 8 deletions
  1. +10
    -4
      source/Makefile.deps.mk
  2. +4
    -4
      source/frontend/Makefile

+ 10
- 4
source/Makefile.deps.mk View File

@@ -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



+ 4
- 4
source/frontend/Makefile View File

@@ -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


Loading…
Cancel
Save