Skip to content

Latest commit

 

History

History
66 lines (46 loc) · 2.02 KB

README.md

File metadata and controls

66 lines (46 loc) · 2.02 KB

MapLibre Logo

maplibre-native-qt

MapLibre Native Qt bindings and Qt Location MapLibre Plugin

Important notice: Repository is being reorganised for Qt 6.5 support. Some features will go away temporarily and API will change also for older releases in the upcoming version 3.0 of the Qt bindings and Qt Location plugin.

Qt support

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.

Get and build

The project uses submodules, so you need to clone it with the following commands:

git clone https://github.com/maplibre/maplibre-native-qt.git
cd maplibre-native-qt
git submodule update --init --recursive

For more details on building the project, see How to build.

How to use?

Once installed QMapLibre can be used in any Qt and CMake project. Two example projects based on Qt 6 are available in the examples directory.

To build an example, run the following commands:

export QMapLibre_DIR="<absolute-path-to-install>"
cmake --workflow --preset default

or alternatively

mkdir build-example && cd build-example
qt-cmake ../maplibre-native-qt/examples/<example> -GNinja \
  -DCMAKE_C_COMPILER_LAUNCHER="ccache" \
  -DCMAKE_CXX_COMPILER_LAUNCHER="ccache" \
  -DCMAKE_PREFIX_PATH="<absolute-path-to-install>"
ninja

For more details on using the library, see Usage.

Copyright

Copyright (C) 2023 MapLibre contributors

The core library may be used under 2-Clause BSD License. QML bindings may be used under the terms of either GNU General Public License version 2.0, GNU General Public License version 3.0 or GNU Lesser General Public License version 3.0. Examples are licensed under MIT. Full texts of the licenses can be found in the LICENSES directory.

Each file contains corresponding license information with SPDX license identifiers to clarify how it can be used.