[build] Move Qt version define to configure.sh
This commit is contained in:
@@ -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)',
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user