MapLibre Native for Qt
|
This library fully supports Qt 6.5 and newer. Qt 5.15 is fully supported only on desktop platforms, previous Qt 5 versions down to 5.6 only support widgets but not Qt Location.
MapLibre Native for Qt uses CMake as its build system. Both the core and the bindings build in the same step. To speed-up the build, ninja
and ccache
are recommended. For Qt 6 using the qt-cmake
wrapper instead of plain cmake
makes building non-desktop platforms easier.
-DCMAKE_TOOLCHAIN_FILE="<path-to-qt>/lib/cmake/Qt6/qt.toolchain.cmake"
A minimal example command is:
See below for platform-specific instructions.
CMake workflow presets are provided for all supported platforms. Run the following command in the root directory to use a preset:
for example
will run the macOS build with ccache
enabled.
It is recommended to set QT_ROOT_DIR
environment variable as the path to the Qt installation to be used, mainly for mobile platforms to use the correct Qt version.
For Android, the ANDROID_ABI
environment variable should be set.
Platform | Qt6 | Qt6 with ccache | Qt5 | Qt5 with ccache |
---|---|---|---|---|
Linux | Linux | Linux-ccache | Linux-legacy | Linux-legacy-ccache |
macOS | macOS | macOS-ccache | macOS-legacy | macOS-legacy-ccache |
Windows | Windows | Windows-ccache | Windows-legacy | Windows-legacy-ccache |
iOS | iOS | iOS-ccache | ||
Android | Android | Android-ccache | ||
WASM | WASM | WASM-ccache |
Platform | Workflow | Description |
---|---|---|
Linux | Linux-coverage | Linux build with Qt6, ccache and code coverage |
Linux | Linux-internal-icu | Linux build with Qt6 and internal ICU library (also with -ccache ) |
macOS | macOS-clang-tidy | macOS build with Qt6, ccache and clang-tidy |
Release binaries are build with -DCMAKE_BUILD_TYPE="Release"
.
Note that when using the standalone Qt installation the system version of the ICU library is still used. You should make sure that the system ICU is not too new as it may prevent your app from running on older versions of Linux. Alternatively you can use internally bundled ICU with the -DMLN_QT_WITH_INTERNAL_ICU=ON
CMake option.
To replicate run:
Release binaries contain debug symbols. Additionally both Intel and ARM versions are supported and included. OS deployment target version is set to 11.0 for Qt 6 and 10.13 for Qt 5.
To replicate run:
Two separate release binaries are provided, one with release build and one with debug build. To achieve that Ninja Multi-Config
generator is used.
To replicate, run:
Two separate release binaries are provided, one with release build and one with debug build. To achieve that Ninja Multi-Config
generator is used. Both device and simulator builds are supported. OS deployment target version is set to 14.0.
To replicate, run:
Release binaries contain debug symbols. Each ABI is built separately.
To replicate, run:
No official binaries are provided for WebAssembly. You can build it yourself using the Emscripten toolchain. The Qt Location module has to be disabled as it is not supported.
To replicate, run: