summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--platform/qt/platform.gyp4
-rw-r--r--platform/qt/scripts/configure.sh4
-rw-r--r--scripts/main.mk3
3 files changed, 5 insertions, 6 deletions
diff --git a/platform/qt/platform.gyp b/platform/qt/platform.gyp
index f73b920520..29901544c9 100644
--- a/platform/qt/platform.gyp
+++ b/platform/qt/platform.gyp
@@ -11,7 +11,7 @@
'qtlibversion': '1.0.0',
},
'conditions': [
- ['qt_version == 5', {
+ ['<(qt_version_major) == 5', {
'includes': [ 'qmlapp/qquickmapboxgl.gypi' ],
}],
],
@@ -115,7 +115,7 @@
],
'conditions': [
- ['qt_version == 5', {
+ ['<(qt_version_major) == 5', {
'variables': {
'cflags': [
'<@(qt_quick_cflags)',
diff --git a/platform/qt/scripts/configure.sh b/platform/qt/scripts/configure.sh
index 08f06508e3..8656a044cb 100644
--- a/platform/qt/scripts/configure.sh
+++ b/platform/qt/scripts/configure.sh
@@ -31,6 +31,9 @@ fi
function print_qt_flags {
mason install Qt system
+ QT_VERSION_MAJOR=$(qmake -query QT_VERSION | cut -d. -f1)
+ CONFIG+=" 'qt_version_major%': ['${QT_VERSION_MAJOR}'],"$LN
+
CONFIG+=" 'qt_core_cflags%': $(quote_flags $(mason cflags Qt system "QtCore")),"$LN
CONFIG+=" 'qt_gui_cflags%': $(quote_flags $(mason cflags Qt system "QtGui")),"$LN
CONFIG+=" 'qt_opengl_cflags%': $(quote_flags $(mason cflags Qt system "QtOpenGL")),"$LN
@@ -41,7 +44,6 @@ function print_qt_flags {
CONFIG+=" 'qt_opengl_ldflags%': $(quote_flags $(mason ldflags Qt system "QtOpenGL")),"$LN
CONFIG+=" 'qt_network_ldflags%': $(quote_flags $(mason ldflags Qt system "QtNetwork")),"$LN
- QT_VERSION_MAJOR=$(qmake -query QT_VERSION | cut -d. -f1)
if [ ${QT_VERSION_MAJOR} -gt 4 ]; then
CONFIG+=" 'qt_qml_cflags%': $(quote_flags $(mason cflags Qt system "QtQml")), "$LN
CONFIG+=" 'qt_quick_cflags%': $(quote_flags $(mason cflags Qt system "QtQuick")), "$LN
diff --git a/scripts/main.mk b/scripts/main.mk
index fa4ac8e19e..754d5ad311 100644
--- a/scripts/main.mk
+++ b/scripts/main.mk
@@ -89,9 +89,6 @@ $(PLATFORM_CONFIG_OUTPUT): .mason configure $(PLATFORM_CONFIG_INPUT)
GYP_FLAGS += -I$(PLATFORM_CONFIG_OUTPUT)
GYP_FLAGS += -Dcoverage=$(ENABLE_COVERAGE)
GYP_FLAGS += -Dcxx_host=$(CXX_HOST)
-ifeq ($(PLATFORM),qt)
- GYP_FLAGS += -Dqt_version=$(shell qmake -query QT_VERSION | cut -d. -f1)
-endif
GYP_FLAGS += -Goutput_dir=.
GYP_FLAGS += --depth=.
GYP_FLAGS += --generator-output=$(PLATFORM_OUTPUT)