Skip to content

Commit

Permalink
Minor documentation tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
ntadej committed Oct 10, 2024
1 parent 5a509f7 commit fcd854f
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 43 deletions.
90 changes: 47 additions & 43 deletions docs/Building.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,55 @@ ninja
ninja install
```

See below for platform-specific instructions.
See [below](#platform-specific-build-instructions) for platform-specific instructions.

@note It is recommended to use [CMake workflows](#using-cmake-workflows) as they
are always up-to-date and cover all supported platforms.

## Using CMake workflows

CMake workflow presets are provided for all supported platforms.
They can be simply used by running in the root directory of the repository:

```shell
cmake --workflow --preset <preset>
```

for example

```shell
cmake --workflow --preset macOS-ccache
```

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, `ANDROID_ABI` environment variable should be set.

### Supported release workflows

| 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` | | |

### Special workflows

| 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` |

## Platform specific build instructions

### Linux

Release binaries are build with `-DCMAKE_BUILD_TYPE="Release"`.
Expand Down Expand Up @@ -92,6 +136,7 @@ cmake ../maplibre-native-qt -G "Ninja Multi-Config" \
-DCMAKE_CONFIGURATION_TYPES="Release;Debug" \
-DCMAKE_C_COMPILER_LAUNCHER="ccache" \
-DCMAKE_CXX_COMPILER_LAUNCHER="ccache" \
-DCMAKE_DEFAULT_CONFIGS="all" \
-DCMAKE_INSTALL_PREFIX="../install"
ninja
ninja install
Expand All @@ -112,6 +157,7 @@ cmake ../maplibre-native-qt -G "Ninja Multi-Config" \
-DCMAKE_CONFIGURATION_TYPES="Release;Debug" \
-DCMAKE_C_COMPILER_LAUNCHER="ccache" \
-DCMAKE_CXX_COMPILER_LAUNCHER="ccache" \
-DCMAKE_DEFAULT_CONFIGS="all" \
-DCMAKE_INSTALL_PREFIX="../install" \
-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" \
-DCMAKE_OSX_DEPLOYMENT_TARGET="14.0"
Expand Down Expand Up @@ -157,48 +203,6 @@ ninja
ninja install
```

## Using CMake workflows

CMake workflow presets are provided for all supported platforms.
They can be simply used by running in the root directory of the repository:

```shell
cmake --workflow --preset <preset>
```

for example

```shell
cmake --workflow --preset macOS-ccache
```

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, `ANDROID_ABI` environment variable should be set.

### Supported release workflows

| 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` | | |

### Special workflows

| 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` |

<div class="section_buttons">

| Previous | Next |
Expand Down
3 changes: 3 additions & 0 deletions docs/Documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ You would normally use this API in a Qt-based application.
If you are interested in the internals of MapLibre Native you can also look at
[Core C++ API](https://maplibre.org/maplibre-native/cpp/api/).

If not explicitly specified, all classes and functions are available
as of version 3.0 of the library.

The source code can be found [on GitHub](https://github.com/maplibre/maplibre-native-qt):

```shell
Expand Down
1 change: 1 addition & 0 deletions docs/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -952,6 +952,7 @@ WARN_LOGFILE =
INPUT = \
../src/core \
../src/widgets \
../CHANGELOG.md \
location \
Documentation.md \
Building.md \
Expand Down

0 comments on commit fcd854f

Please sign in to comment.