Skip to content

Commit

Permalink
Add Ninja to the list of required tools
Browse files Browse the repository at this point in the history
We have plenty of command lines that explicitly use `-GNinja`, so let's
make Ninja a tool that is required. That's easier than changing all the
command lines to have two variants (use XX or YY if you have Ninja
installed), and we know that the dependency handling works best with
Ninja.

Fixes #2495
  • Loading branch information
tronical committed Apr 6, 2023
1 parent 8b1683b commit f709e33
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion api/cpp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Slint comes with a CMake integration that automates the compilation step of the
offers a CMake target for convenient linkage.

*Note*: We recommend using the Ninja generator of CMake for the most efficient build and `.slint` dependency tracking.
You can select the CMake Ninja backend by passing `-GNinja` or setting the `CMAKE_GENERATOR` environment variable to `Ninja`.
Install [Ninja](https://ninja-build.org) and select the CMake Ninja backend by passing `-GNinja` or setting the `CMAKE_GENERATOR` environment variable to `Ninja`.

### Building from Sources

Expand Down
2 changes: 1 addition & 1 deletion api/cpp/docs/cmake.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Slint comes with a CMake integration that automates the compilation step of the
offers a CMake target for convenient linkage.

*Note*: We recommend using the Ninja generator of CMake for the most efficient build and `.slint` dependency tracking.
You can select the CMake Ninja backend by passing `-GNinja` or setting the `CMAKE_GENERATOR` environment variable to `Ninja`.
Install [Ninja](https://ninja-build.org) and select the CMake Ninja backend by passing `-GNinja` or setting the `CMAKE_GENERATOR` environment variable to `Ninja`.

## Binary Packages

Expand Down
1 change: 1 addition & 0 deletions docs/building.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ environment variable `RUST_FONTCONFIG_DLOPEN=on`. This can be useful for [cross-
To use Slint from C++, the following extra dependencies are needed:

- **[cmake](https://cmake.org/download/)** (3.21 or newer)
- **[Ninja](https://ninja-build.org)**
- A C++ compiler that supports C++20 (e.g., **MSVC 2022 17.3** on Windows, or **GCC 10**)

### Node.js API (optional)
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorial/cpp/src/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
In this tutorial, we use C++ as the host programming language. We also support other programming languages like
[Rust](https://slint-ui.com/docs/rust/slint/) or [JavaScript](https://slint-ui.com/docs/node/).

You will need a development environment that can compile C++20 with CMake 3.21.
You will need a development environment that can compile C++20, [CMake 3.21](https://cmake.org/download/), and [Ninja](https://ninja-build.org).
We don't provide binaries of Slint yet, so we will use the CMake integration that will automatically build
the tools and library from source. Since it's implemented in the Rust programming language, this means that
you also need to install a Rust compiler (1.66 or newer). You can easily install a Rust compiler
Expand Down

0 comments on commit f709e33

Please sign in to comment.