diff options
Diffstat (limited to 'platform/qt')
-rw-r--r-- | platform/qt/app/qmapboxgl.gypi | 58 | ||||
-rw-r--r-- | platform/qt/bitrise-qt4.yml | 1 | ||||
-rw-r--r-- | platform/qt/bitrise-qt5.yml | 1 | ||||
-rw-r--r-- | platform/qt/platform.gyp | 237 | ||||
-rw-r--r-- | platform/qt/qmlapp/qquickmapboxgl.gypi | 60 | ||||
-rw-r--r-- | platform/qt/qt.gypi | 20 | ||||
-rw-r--r-- | platform/qt/scripts/configure.sh | 92 |
7 files changed, 2 insertions, 467 deletions
diff --git a/platform/qt/app/qmapboxgl.gypi b/platform/qt/app/qmapboxgl.gypi deleted file mode 100644 index 22b4e1281e..0000000000 --- a/platform/qt/app/qmapboxgl.gypi +++ /dev/null @@ -1,58 +0,0 @@ -{ - 'targets': [ - { - 'target_name': 'qt-app', - 'product_name': 'qmapboxgl', - 'type': 'executable', - - 'includes': [ - '../qt.gypi', - ], - - 'dependencies': [ - 'qt-lib', - ], - - 'sources': [ - 'main.cpp', - 'mapwindow.cpp', - 'mapwindow.hpp', - 'source.qrc', - ], - - 'include_dirs': [ - '../include', - ], - - 'variables': { - 'cflags': [ - '<@(opengl_cflags)', - '<@(qt_core_cflags)', - '<@(qt_gui_cflags)', - '<@(qt_opengl_cflags)', - '-fPIC', - # Qt4 generates code with unused variables. - '-Wno-unused-variable', - ], - 'ldflags': [ - '<@(opengl_ldflags)', - '<@(qt_core_ldflags)', - '<@(qt_gui_ldflags)', - '<@(qt_opengl_ldflags)', - ], - }, - - 'conditions': [ - ['OS == "mac"', { - 'xcode_settings': { - 'OTHER_CPLUSPLUSFLAGS': [ '<@(cflags)' ], - 'OTHER_LDFLAGS': [ '<@(ldflags)' ], - }, - }, { - 'cflags_cc': [ '<@(cflags)' ], - 'libraries': [ '<@(ldflags)' ], - }], - ], - }, - ], -} diff --git a/platform/qt/bitrise-qt4.yml b/platform/qt/bitrise-qt4.yml index aeff150ee7..baa58a0308 100644 --- a/platform/qt/bitrise-qt4.yml +++ b/platform/qt/bitrise-qt4.yml @@ -29,6 +29,7 @@ workflows: - content: |- #!/bin/bash set -eu -o pipefail + brew install cmake brew install qt brew link qt brew linkapps qt diff --git a/platform/qt/bitrise-qt5.yml b/platform/qt/bitrise-qt5.yml index a612263e48..9c60e45119 100644 --- a/platform/qt/bitrise-qt5.yml +++ b/platform/qt/bitrise-qt5.yml @@ -29,6 +29,7 @@ workflows: - content: |- #!/bin/bash set -eu -o pipefail + brew install cmake brew install qt5 brew link qt5 --force brew linkapps qt5 diff --git a/platform/qt/platform.gyp b/platform/qt/platform.gyp deleted file mode 100644 index cb46aab07e..0000000000 --- a/platform/qt/platform.gyp +++ /dev/null @@ -1,237 +0,0 @@ -{ - 'variables': { - 'loop_lib': 'qt', - 'conditions': [ - ['OS == "mac"', { - 'headless_lib': 'cgl', - }, { - 'headless_lib': 'glx', - }] - ], - 'qtlibversion': '1.0.0', - 'coverage': 0, - }, - 'conditions': [ - ['<(qt_version_major) == 5', { - 'includes': [ 'qmlapp/qquickmapboxgl.gypi' ], - }], - ], - 'includes': [ - 'app/qmapboxgl.gypi', - '../../mbgl.gypi', - '../../test/test.gypi', - ], - 'targets': [ - { - 'target_name': 'platform-lib', - 'product_name': 'mbgl-platform-qt', - 'type': 'static_library', - 'standalone_static_library': 1, - 'hard_dependency': 1, - - 'dependencies': [ - 'core', - ], - - 'includes': [ - 'qt.gypi', - ], - - 'sources': [ - '../default/asset_file_source.cpp', - '../default/default_file_source.cpp', - '../default/log_stderr.cpp', - '../default/mbgl/storage/offline.cpp', - '../default/mbgl/storage/offline_database.cpp', - '../default/mbgl/storage/offline_download.cpp', - '../default/online_file_source.cpp', - '../default/sqlite3.cpp', - 'include/qmapbox.hpp', - 'include/qmapboxgl.hpp', - 'include/qquickmapboxgl.hpp', - 'include/qquickmapboxglstyleproperty.hpp', - 'qmapbox.qrc', - 'src/async_task.cpp', - 'src/async_task_impl.hpp', - 'src/http_file_source.cpp', - 'src/http_file_source.hpp', - 'src/http_request.cpp', - 'src/http_request.hpp', - 'src/image.cpp', - 'src/qmapbox.cpp', - 'src/qmapboxgl.cpp', - 'src/qmapboxgl_p.hpp', - 'src/qquickmapboxgl.cpp', - 'src/qquickmapboxglstyleproperty.cpp', - 'src/qquickmapboxglrenderer.cpp', - 'src/qquickmapboxglrenderer.hpp', - 'src/run_loop.cpp', - 'src/run_loop_impl.hpp', - 'src/string_stdlib.cpp', - 'src/timer.cpp', - 'src/timer_impl.hpp', - ], - - 'variables': { - 'cflags': [ - '<@(boost_cflags)', - '<@(geojson_cflags)', - '<@(libjpeg-turbo_cflags)', - '<@(nunicode_cflags)', - '<@(opengl_cflags)', - '<@(qt_core_cflags)', - '<@(qt_gui_cflags)', - '<@(qt_network_cflags)', - '<@(rapidjson_cflags)', - '<@(sqlite_cflags)', - '-fPIC', - ], - 'ldflags': [ - '<@(nunicode_ldflags)', - '<@(opengl_ldflags)', - '<@(qt_core_ldflags)', - '<@(qt_gui_ldflags)', - '<@(qt_network_ldflags)', - '<@(sqlite_ldflags)', - '<@(zlib_ldflags)', - ], - 'libraries': [ - '<@(geojson_static_libs)', - '<@(libjpeg-turbo_static_libs)', - '<@(nunicode_static_libs)', - '<@(sqlite_static_libs)', - '<@(zlib_static_libs)', - ], - }, - - 'include_dirs': [ - 'include', - '../default', - '../../include', - '../../src', # TODO: eliminate - ], - - 'conditions': [ - ['<(qt_image_decoders) == 0', { - 'sources': [ - '../default/jpeg_reader.cpp', - '../default/webp_reader.cpp', - ], - 'variables': { - 'cflags': [ - '<@(libjpeg-turbo_cflags)', - '<@(webp_cflags)', - ], - 'ldflags': [ - '<@(libjpeg-turbo_ldflags)', - '<@(webp_ldflags)', - ], - 'libraries': [ - '<@(libjpeg-turbo_static_libs)', - '<@(webp_static_libs)', - ], - }, - }, { - 'variables': { - 'cflags': [ - '-DQT_IMAGE_DECODERS', - ], - }, - }], - ['<(qt_version_major) == 4', { - 'variables': { - 'cflags': [ - '<@(qt_opengl_cflags)', - # Qt4 generates code with unused variables. - '-Wno-unused-variable', - ], - 'ldflags': [ - '<@(qt_opengl_ldflags)', - ], - }, - }], - ['<(qt_version_major) == 5', { - 'variables': { - 'cflags': [ - '<@(qt_location_cflags)', - '<@(qt_positioning_cflags)', - '<@(qt_quick_cflags)', - ], - 'ldflags': [ - '<@(qt_location_ldflags)', - '<@(qt_positioning_ldflags)', - '<@(qt_quick_ldflags)', - ], - }, - }, { - 'sources/': [ [ 'exclude', 'qquick*' ] ], - }], - ['OS == "mac"', { - 'xcode_settings': { - 'OTHER_CPLUSPLUSFLAGS': [ '<@(cflags)' ], - }, - 'sources': [ - '../darwin/src/nsthread.mm', - ], - }, { - 'cflags_cc': [ '<@(cflags)' ], - 'sources': [ - '../default/thread.cpp', - ], - }] - ], - - 'link_settings': { - 'conditions': [ - ['OS == "mac"', { - 'libraries': [ - '<@(libraries)', - '$(SDKROOT)/System/Library/Frameworks/Cocoa.framework', - ], - 'xcode_settings': { 'OTHER_LDFLAGS': [ '<@(ldflags)' ] } - }, { - 'libraries': [ '<@(libraries)', '<@(ldflags)' ], - }] - ], - }, - }, - { - 'target_name': 'qt-lib', - 'product_name': 'qmapboxgl', - 'type': 'shared_library', - 'product_extension': 'so.<(qtlibversion)', - - 'includes': [ - 'qt.gypi', - ], - - 'dependencies': [ - 'platform-lib', - ], - - 'link_settings': { - 'conditions': [ - ['OS == "mac"', { - 'xcode_settings': { - 'OTHER_LDFLAGS': [ '-all_load' ], - 'LD_DYLIB_INSTALL_NAME': '@executable_path/libqmapboxgl.so.<(qtlibversion)', - } - }] - ], - }, - }, - { - 'target_name': 'test', - 'type': 'executable', - - 'dependencies': [ - 'test-lib', - 'platform-lib', - ], - - 'sources': [ - '../../test/src/main.cpp', - ], - }, - ], -} diff --git a/platform/qt/qmlapp/qquickmapboxgl.gypi b/platform/qt/qmlapp/qquickmapboxgl.gypi deleted file mode 100644 index 7b539a52f2..0000000000 --- a/platform/qt/qmlapp/qquickmapboxgl.gypi +++ /dev/null @@ -1,60 +0,0 @@ -{ - 'targets': [ - { - 'target_name': 'qt-qml-app', - 'product_name': 'qquickmapboxgl', - 'type': 'executable', - - 'includes': [ - '../qt.gypi', - ], - - 'dependencies': [ - 'qt-lib', - ], - - 'sources': [ - 'main.cpp', - 'qml.qrc', - ], - - 'include_dirs': [ - '../include', - ], - - 'variables': { - 'cflags': [ - '<@(opengl_cflags)', - '<@(qt_core_cflags)', - '<@(qt_gui_cflags)', - '<@(qt_location_cflags)', - '<@(qt_positioning_cflags)', - '<@(qt_qml_cflags)', - '<@(qt_quick_cflags)', - '-fPIC', - ], - 'ldflags': [ - '<@(opengl_ldflags)', - '<@(qt_core_ldflags)', - '<@(qt_gui_ldflags)', - '<@(qt_location_ldflags)', - '<@(qt_positioning_ldflags)', - '<@(qt_qml_ldflags)', - '<@(qt_quick_ldflags)', - ], - }, - - 'conditions': [ - ['OS == "mac"', { - 'xcode_settings': { - 'OTHER_CPLUSPLUSFLAGS': [ '<@(cflags)' ], - 'OTHER_LDFLAGS': [ '<@(ldflags)' ], - }, - }, { - 'cflags_cc': [ '<@(cflags)' ], - 'libraries': [ '<@(ldflags)' ], - }], - ], - }, - ], -} diff --git a/platform/qt/qt.gypi b/platform/qt/qt.gypi deleted file mode 100644 index e98b3254b0..0000000000 --- a/platform/qt/qt.gypi +++ /dev/null @@ -1,20 +0,0 @@ -{ - 'rules': [ - { - 'rule_name': 'MOC files', - 'extension': 'hpp', - 'process_outputs_as_sources': 1, - 'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/<(RULE_INPUT_DIRNAME)/moc_<(RULE_INPUT_ROOT).cpp' ], - 'action': [ '<(qt_moc)', '<(RULE_INPUT_PATH)', '-o', '<(SHARED_INTERMEDIATE_DIR)/<(RULE_INPUT_DIRNAME)/moc_<(RULE_INPUT_ROOT).cpp' ], - 'message': 'Generating MOC <(RULE_INPUT_ROOT).cpp', - }, - { - 'rule_name': 'QRC files', - 'extension': 'qrc', - 'process_outputs_as_sources': 1, - 'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/<(RULE_INPUT_DIRNAME)/qrc_<(RULE_INPUT_ROOT).cpp' ], - 'action': [ '<(qt_rcc)', '<(RULE_INPUT_PATH)', '-name', '<(RULE_INPUT_ROOT)', '-o', '<(SHARED_INTERMEDIATE_DIR)/<(RULE_INPUT_DIRNAME)/qrc_<(RULE_INPUT_ROOT).cpp' ], - 'message': 'Generating QRC <(RULE_INPUT_ROOT).cpp', - }, - ], -} diff --git a/platform/qt/scripts/configure.sh b/platform/qt/scripts/configure.sh deleted file mode 100644 index 23f4b0bf52..0000000000 --- a/platform/qt/scripts/configure.sh +++ /dev/null @@ -1,92 +0,0 @@ -#!/usr/bin/env bash - -CXX11ABI=${CXX11ABI:-$(scripts/check-cxx11abi.sh)} - -UNIQUE_RESOURCE_VERSION=dev -PROTOZERO_VERSION=1.3.0 -BOOST_VERSION=1.60.0 -GEOMETRY_VERSION=0.8.0 -GEOJSON_VERSION=0.1.4${CXX11ABI:-} -GEOJSONVT_VERSION=6.1.2 -SUPERCLUSTER_VERSION=0.2.0 -KDBUSH_VERSION=0.1.1 -GTEST_VERSION=1.7.0${CXX11ABI:-} -LIBJPEG_TURBO_VERSION=1.4.2 -PIXELMATCH_VERSION=0.9.0 -RAPIDJSON_VERSION=1.0.2 -SQLITE_VERSION=3.9.1 -VARIANT_VERSION=1.1.0 -ZLIB_VERSION=system -WEBP_VERSION=0.5.0 -EARCUT_VERSION=0.11 - -function print_default_flags { - CONFIG+=" 'cflags': $(quote_flags -fvisibility=hidden -D__QT__),"$LN -} - -if [ "$MASON_PLATFORM" == "osx" ]; then - # XXX: Argh, adding the __QT__ flag here because GYP for OSX does - # not respect the `cflags` variable above and we need it to reach - # the utests somehow. Gonna be fixed properly when we move to CMake. - function print_opengl_flags { - CONFIG+=" 'opengl_cflags%': ['-D__QT__'],"$LN - CONFIG+=" 'opengl_ldflags%': ['-framework OpenGL', '-framework CoreFoundation'],"$LN - } -else - function print_opengl_flags { - CONFIG+=" 'opengl_cflags%': $(quote_flags $(pkg-config gl x11 --cflags)),"$LN - CONFIG+=" 'opengl_ldflags%': $(quote_flags $(pkg-config gl x11 --libs)),"$LN - } -fi - -function print_qt_flags { - mason install Qt system - - QMAKE="qmake" - if [ ! $(which ${QMAKE} 2>/dev/null) ]; then - QMAKE="qmake-qt5" - fi - - QT_VERSION_MAJOR=$(${QMAKE} -query QT_VERSION | cut -d. -f1) - CONFIG+=" 'qt_version_major%': ['${QT_VERSION_MAJOR}'],"$LN - CONFIG+=" 'qt_image_decoders%': [0],"$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 - CONFIG+=" 'qt_network_cflags%': $(quote_flags $(mason cflags Qt system "QtNetwork")),"$LN - - CONFIG+=" 'qt_core_ldflags%': $(quote_flags $(mason ldflags Qt system "QtCore")),"$LN - CONFIG+=" 'qt_gui_ldflags%': $(quote_flags $(mason ldflags Qt system "QtGui")),"$LN - CONFIG+=" 'qt_opengl_ldflags%': $(quote_flags $(mason ldflags Qt system "QtOpenGL")),"$LN - CONFIG+=" 'qt_network_ldflags%': $(quote_flags $(mason ldflags Qt system "QtNetwork")),"$LN - - if [ ${QT_VERSION_MAJOR} -gt 4 ]; then - CONFIG+=" 'qt_location_cflags%': $(quote_flags $(mason cflags Qt system "QtLocation")),"$LN - CONFIG+=" 'qt_qml_cflags%': $(quote_flags $(mason cflags Qt system "QtQml")), "$LN - CONFIG+=" 'qt_quick_cflags%': $(quote_flags $(mason cflags Qt system "QtQuick")), "$LN - CONFIG+=" 'qt_positioning_cflags%': $(quote_flags $(mason cflags Qt system "QtPositioning")),"$LN - - CONFIG+=" 'qt_location_ldflags%': $(quote_flags $(mason ldflags Qt system "QtLocation")),"$LN - CONFIG+=" 'qt_qml_ldflags%': $(quote_flags $(mason ldflags Qt system "QtQml")), "$LN - CONFIG+=" 'qt_quick_ldflags%': $(quote_flags $(mason ldflags Qt system "QtQuick")), "$LN - CONFIG+=" 'qt_positioning_ldflags%': $(quote_flags $(mason ldflags Qt system "QtPositioning")),"$LN - fi - - if hash moc 2>/dev/null && hash rcc 2>/dev/null; then - CONFIG+=" 'qt_moc%': '$(which moc)',"$LN - CONFIG+=" 'qt_rcc%': '$(which rcc)',"$LN - elif [ ${QT_VERSION_MAJOR} -gt 4 ] ; then - CONFIG+=" 'qt_moc%': '$(pkg-config Qt${QT_VERSION_MAJOR}Core --variable=host_bins)/moc',"$LN - CONFIG+=" 'qt_rcc%': '$(pkg-config Qt${QT_VERSION_MAJOR}Core --variable=host_bins)/rcc',"$LN - else - CONFIG+=" 'qt_moc%': '$(pkg-config QtCore --variable=moc_location)',"$LN - CONFIG+=" 'qt_rcc%': '$(pkg-config QtCore --variable=rcc_location)',"$LN - fi -} - -CONFIGURE_SUPLATFORM=platform/qt/scripts/configure-${MASON_PLATFORM_VERSION}.sh - -if [ -f $CONFIGURE_SUPLATFORM ]; then - source $CONFIGURE_SUPLATFORM -fi |