diff --git a/.github/actions/qt5-build/entrypoint.sh b/.github/actions/qt5-build/entrypoint.sh index b589c6e10..5aa2f884e 100755 --- a/.github/actions/qt5-build/entrypoint.sh +++ b/.github/actions/qt5-build/entrypoint.sh @@ -16,6 +16,7 @@ cmake ../source/ \ -DCMAKE_CXX_COMPILER_LAUNCHER="ccache" \ -DCMAKE_INSTALL_PREFIX=../install \ -DMBGL_WITH_QT=ON \ + -DMBGL_QT_DEPLOYMENT=ON \ -DMBGL_QT_LIBRARY_ONLY=ON ninja ninja install diff --git a/.github/actions/qt6-build/entrypoint.sh b/.github/actions/qt6-build/entrypoint.sh index 5a1e413f3..9384f3aac 100755 --- a/.github/actions/qt6-build/entrypoint.sh +++ b/.github/actions/qt6-build/entrypoint.sh @@ -14,6 +14,7 @@ qt-cmake ../source/ \ -DCMAKE_CXX_COMPILER_LAUNCHER="ccache" \ -DCMAKE_INSTALL_PREFIX=../install \ -DMBGL_WITH_QT=ON \ + -DMBGL_QT_DEPLOYMENT=ON \ -DMBGL_QT_LIBRARY_ONLY=ON ninja ninja install diff --git a/.github/workflows/qt-ci.yml b/.github/workflows/qt-ci.yml index 183e74660..dc8feaf71 100644 --- a/.github/workflows/qt-ci.yml +++ b/.github/workflows/qt-ci.yml @@ -71,7 +71,7 @@ concurrency: cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} jobs: - build-core: + build: strategy: matrix: include: @@ -83,7 +83,7 @@ jobs: - name: Linux os: ubuntu-22.04 build_type: RelWithDebInfo - qt_version: 6.3.1 + qt_version: 6.3.2 qt_target: desktop - name: macOS os: macos-12 @@ -95,7 +95,7 @@ jobs: - name: macOS os: macos-12 build_type: RelWithDebInfo - qt_version: 6.3.1 + qt_version: 6.3.2 qt_target: desktop deployment_target: 10.14 deployment_arch: "x86_64;arm64" @@ -113,7 +113,7 @@ jobs: build_type: "RelWithDebInfo;Debug" compiler_type: x64 compiler_version: 14.29 - qt_version: 6.3.1 + qt_version: 6.3.2 qt_target: desktop qt_arch: win64_msvc2019_64 qt_tools: '' @@ -131,7 +131,7 @@ jobs: build_type: RelWithDebInfo compiler_type: mingw1120_64 compiler_version: 11.2.0 - qt_version: 6.3.1 + qt_version: 6.3.2 qt_target: desktop qt_arch: win64_mingw qt_tools: tools_mingw90 @@ -210,6 +210,7 @@ jobs: -DCMAKE_OSX_DEPLOYMENT_TARGET="${DEPLOYMENT_TARGET}" \ -DCMAKE_OSX_ARCHITECTURES="${DEPLOYMENT_ARCH}" \ -DMBGL_WITH_QT=ON \ + -DMBGL_QT_DEPLOYMENT=ON \ -DMBGL_QT_LIBRARY_ONLY=ON ninja ninja install @@ -236,6 +237,7 @@ jobs: -DCMAKE_CXX_COMPILER_LAUNCHER="ccache.exe" \ -DCMAKE_INSTALL_PREFIX="../install" \ -DMBGL_WITH_QT=ON \ + -DMBGL_QT_DEPLOYMENT=ON \ -DMBGL_QT_LIBRARY_ONLY=ON ninja.exe ninja.exe install @@ -245,3 +247,38 @@ jobs: with: name: maplibre-gl-native_${{ matrix.name }}_Qt${{ matrix.qt_version }} path: install + + release: + name: Release QMapLibreGL + if: github.ref_type == 'tag' + runs-on: ubuntu-22.04 + needs: build + strategy: + matrix: + name: [Linux, macOS, win64_msvc2019, win64_mingw] + qt_version: [5.15.2, 6.3.2] + permissions: + contents: write + + steps: + - name: Download artifacts + uses: actions/download-artifact@v3 + with: + name: maplibre-gl-native_${{ matrix.name }}_Qt${{ matrix.qt_version }} + path: install + + - name: Make tarball + env: + TAG_NAME: ${{ github.ref_name }} + TAG_PLATFORM: ${{ matrix.name }} + QT_VERSION: ${{ matrix.qt_version }} + run: | + cd install + tar cjvf ../QMapLibreGL_${TAG_NAME//qt-/}_Qt${QT_VERSION}_${TAG_PLATFORM}.tar.bz2 * + + - name: Release + uses: ncipollo/release-action@v1 + with: + artifacts: QMapLibreGL_*.tar.bz2 + allowUpdates: true + draft: true diff --git a/CHANGELOG.md b/CHANGELOG.md index d76aaf73e..52ed8b08c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,6 @@ - *...Add new stuff here...* - [core] Add `ClientOptions` to configure client information [#365](https://github.com/maplibre/maplibre-gl-native/pull/365). -- [qt] Build user agent based on `ClientOptions`, if available [#365](https://github.com/maplibre/maplibre-gl-native/pull/365). ### ✨ Technical Improvements diff --git a/platform/qt/CHANGELOG.md b/platform/qt/CHANGELOG.md new file mode 100644 index 000000000..216c030e8 --- /dev/null +++ b/platform/qt/CHANGELOG.md @@ -0,0 +1,9 @@ +# Changelog + +## v2.0 + +### ✨ New features + +- Full Qt5 and Qt6 support for macOS, Linux, Windows, iOS and Android. +- Rename to `QMapLibreGL` ([#338](https://github.com/maplibre/maplibre-gl-native/pull/338)). +- Build user agent based on `ClientOptions`, if available ([#365](https://github.com/maplibre/maplibre-gl-native/pull/365)). diff --git a/platform/qt/qt.cmake b/platform/qt/qt.cmake index d058493f1..67a8e7af1 100644 --- a/platform/qt/qt.cmake +++ b/platform/qt/qt.cmake @@ -10,6 +10,7 @@ option(MBGL_QT_STATIC "Build MapLibre GL Qt bindings staticly" OFF) option(MBGL_QT_INSIDE_PLUGIN "Build QMapLibreGL as OBJECT library, so it can be bundled into separate single plugin lib." OFF) option(MBGL_QT_WITH_HEADLESS "Build MapLibre GL Qt with headless support" ON) option(MBGL_QT_WITH_INTERNAL_SQLITE "Build MapLibre GL Qt bindings with internal sqlite" OFF) +option(MBGL_QT_DEPLOYMENT "Autogenerate files necessary for deployment" OFF) find_package(QT NAMES Qt6 Qt5 COMPONENTS Core REQUIRED) find_package(Qt${QT_VERSION_MAJOR} @@ -248,6 +249,11 @@ install( COMPONENT development ) +if(MBGL_QT_DEPLOYMENT) + install(FILES ${PROJECT_SOURCE_DIR}/LICENSE.md + DESTINATION .) +endif() + # FIXME: Because of rapidjson conversion target_include_directories( qmaplibregl diff --git a/platform/qt/scripts/configure_Qt5_Linux.sh b/platform/qt/scripts/configure_Qt5_Linux.sh index 8f5b88cb8..43d54a8eb 100755 --- a/platform/qt/scripts/configure_Qt5_Linux.sh +++ b/platform/qt/scripts/configure_Qt5_Linux.sh @@ -12,6 +12,6 @@ fi cmake "$1" \ -G Ninja \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DCMAKE_BUILD_TYPE="RelWithDebInfo" \ -DMBGL_WITH_QT=ON \ -DCMAKE_INSTALL_PREFIX="$2" diff --git a/platform/qt/scripts/configure_Qt5_iOS_static.sh b/platform/qt/scripts/configure_Qt5_iOS_static.sh index dc9a8eb3b..14b5f8b1e 100755 --- a/platform/qt/scripts/configure_Qt5_iOS_static.sh +++ b/platform/qt/scripts/configure_Qt5_iOS_static.sh @@ -17,10 +17,10 @@ fi cmake "$1" \ -G"Ninja Multi-Config" \ - -DCMAKE_SYSTEM_NAME=iOS \ + -DCMAKE_SYSTEM_NAME="iOS" \ -DCMAKE_CONFIGURATION_TYPES="Release;Debug" \ -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" \ - -DCMAKE_OSX_DEPLOYMENT_TARGET=12.0 \ + -DCMAKE_OSX_DEPLOYMENT_TARGET="12.0" \ -DMBGL_WITH_QT=ON \ -DMBGL_QT_STATIC=ON \ -DMBGL_QT_LIBRARY_ONLY=ON \ diff --git a/platform/qt/scripts/configure_Qt5_macOS.sh b/platform/qt/scripts/configure_Qt5_macOS.sh index f47284e72..abcdd8055 100755 --- a/platform/qt/scripts/configure_Qt5_macOS.sh +++ b/platform/qt/scripts/configure_Qt5_macOS.sh @@ -12,7 +12,7 @@ fi cmake "$1" \ -G Ninja \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - -DCMAKE_OSX_DEPLOYMENT_TARGET=10.13 \ + -DCMAKE_BUILD_TYPE="RelWithDebInfo" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET="10.13" \ -DMBGL_WITH_QT=ON \ -DCMAKE_INSTALL_PREFIX="$2" diff --git a/platform/qt/scripts/configure_Qt5_macOS_static.sh b/platform/qt/scripts/configure_Qt5_macOS_static.sh index 50aa2ff11..fd030309d 100755 --- a/platform/qt/scripts/configure_Qt5_macOS_static.sh +++ b/platform/qt/scripts/configure_Qt5_macOS_static.sh @@ -12,8 +12,8 @@ fi cmake "$1" \ -G Ninja \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - -DCMAKE_OSX_DEPLOYMENT_TARGET=10.13 \ + -DCMAKE_BUILD_TYPE="RelWithDebInfo" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET="10.13" \ -DMBGL_WITH_QT=ON \ -DMBGL_QT_STATIC=ON \ -DMBGL_QT_LIBRARY_ONLY=ON \ diff --git a/platform/qt/scripts/configure_Qt6_macOS.sh b/platform/qt/scripts/configure_Qt6_macOS.sh index 965efc232..8b5feb04a 100755 --- a/platform/qt/scripts/configure_Qt6_macOS.sh +++ b/platform/qt/scripts/configure_Qt6_macOS.sh @@ -12,8 +12,8 @@ fi qt-cmake "$1" \ -G Ninja \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - -DCMAKE_OSX_DEPLOYMENT_TARGET=10.14 \ + -DCMAKE_BUILD_TYPE="RelWithDebInfo" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET="10.14" \ -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" \ -DMBGL_WITH_QT=ON \ -DCMAKE_INSTALL_PREFIX="$2" diff --git a/platform/qt/scripts/configure_Qt6_macOS_static.sh b/platform/qt/scripts/configure_Qt6_macOS_static.sh index 656289e16..714204fc2 100755 --- a/platform/qt/scripts/configure_Qt6_macOS_static.sh +++ b/platform/qt/scripts/configure_Qt6_macOS_static.sh @@ -12,8 +12,8 @@ fi qt-cmake "$1" \ -G Ninja \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - -DCMAKE_OSX_DEPLOYMENT_TARGET=10.14 \ + -DCMAKE_BUILD_TYPE="RelWithDebInfo" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET="10.14" \ -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" \ -DMBGL_WITH_QT=ON \ -DMBGL_QT_STATIC=ON \