mirror of
https://github.com/slint-ui/slint.git
synced 2025-09-27 04:19:37 +00:00
cmake: Bump minimal cmake version to 3.23
This commit is contained in:
parent
a45596b251
commit
52a70b7d89
18 changed files with 19 additions and 19 deletions
|
@ -1,7 +1,7 @@
|
||||||
# Copyright © SixtyFPS GmbH <info@slint-ui.com>
|
# Copyright © SixtyFPS GmbH <info@slint-ui.com>
|
||||||
# SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-commercial
|
# SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-commercial
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.19)
|
cmake_minimum_required(VERSION 3.23)
|
||||||
|
|
||||||
project(Slint LANGUAGES CXX)
|
project(Slint LANGUAGES CXX)
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Copyright © SixtyFPS GmbH <info@slint-ui.com>
|
# Copyright © SixtyFPS GmbH <info@slint-ui.com>
|
||||||
# SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-commercial
|
# SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-commercial
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.19)
|
cmake_minimum_required(VERSION 3.23)
|
||||||
project(Slint HOMEPAGE_URL "https://slint-ui.com/" LANGUAGES CXX)
|
project(Slint HOMEPAGE_URL "https://slint-ui.com/" LANGUAGES CXX)
|
||||||
|
|
||||||
include(FeatureSummary)
|
include(FeatureSummary)
|
||||||
|
|
|
@ -25,7 +25,7 @@ First you need to install the prerequisites:
|
||||||
|
|
||||||
* Install Rust by following the [Rust Getting Started Guide](https://www.rust-lang.org/learn/get-started). Once this is done,
|
* Install Rust by following the [Rust Getting Started Guide](https://www.rust-lang.org/learn/get-started). Once this is done,
|
||||||
you should have the ```rustc``` compiler and the ```cargo``` build system installed in your path.
|
you should have the ```rustc``` compiler and the ```cargo``` build system installed in your path.
|
||||||
* **[cmake](https://cmake.org/download/)** (3.21 or newer)
|
* **[cmake](https://cmake.org/download/)** (3.23 or newer)
|
||||||
* A C++ compiler that supports C++20 (e.g., **MSVC 2019 16.6** on Windows)
|
* A C++ compiler that supports C++20 (e.g., **MSVC 2019 16.6** on Windows)
|
||||||
|
|
||||||
You can include Slint in your CMake project using CMake's `FetchContent` feature. Insert the following snippet into your
|
You can include Slint in your CMake project using CMake's `FetchContent` feature. Insert the following snippet into your
|
||||||
|
|
|
@ -42,7 +42,7 @@ First you need to install the prerequisites:
|
||||||
* Install Rust by following the [Rust Getting Started Guide](https://www.rust-lang.org/learn/get-started). If you already
|
* Install Rust by following the [Rust Getting Started Guide](https://www.rust-lang.org/learn/get-started). If you already
|
||||||
have Rust installed, make sure that it's at least version 1.60 or newer. You can check which version you have installed
|
have Rust installed, make sure that it's at least version 1.60 or newer. You can check which version you have installed
|
||||||
by running `rustc --version`. Once this is done, you should have the ```rustc``` compiler and the ```cargo``` build system installed in your path.
|
by running `rustc --version`. Once this is done, you should have the ```rustc``` compiler and the ```cargo``` build system installed in your path.
|
||||||
* **[cmake](https://cmake.org/download/)** (3.21 or newer)
|
* **[cmake](https://cmake.org/download/)** (3.23 or newer)
|
||||||
* A C++ compiler that supports C++20 (e.g., **MSVC 2019 16.6** on Windows)
|
* A C++ compiler that supports C++20 (e.g., **MSVC 2019 16.6** on Windows)
|
||||||
|
|
||||||
You can include Slint into your CMake project using CMake's
|
You can include Slint into your CMake project using CMake's
|
||||||
|
|
|
@ -15,7 +15,7 @@ target in two steps:
|
||||||
A minimal CMake `CMakeLists.txt` file looks like this:
|
A minimal CMake `CMakeLists.txt` file looks like this:
|
||||||
|
|
||||||
```cmake
|
```cmake
|
||||||
cmake_minimum_required(VERSION 3.21)
|
cmake_minimum_required(VERSION 3.23)
|
||||||
project(my_application LANGUAGES CXX)
|
project(my_application LANGUAGES CXX)
|
||||||
|
|
||||||
# Note: Use find_package(Slint) instead of the following three commands,
|
# Note: Use find_package(Slint) instead of the following three commands,
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Copyright © SixtyFPS GmbH <info@slint-ui.com>
|
# Copyright © SixtyFPS GmbH <info@slint-ui.com>
|
||||||
# SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-commercial
|
# SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-commercial
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.14)
|
cmake_minimum_required(VERSION 3.23)
|
||||||
|
|
||||||
if (NOT TARGET Slint::Slint)
|
if (NOT TARGET Slint::Slint)
|
||||||
find_package(Slint REQUIRED)
|
find_package(Slint REQUIRED)
|
||||||
|
|
|
@ -14,7 +14,7 @@ In a new directory, we create a new `CMakeLists.txt` file.
|
||||||
|
|
||||||
```cmake
|
```cmake
|
||||||
# CMakeLists.txt
|
# CMakeLists.txt
|
||||||
cmake_minimum_required(VERSION 3.21)
|
cmake_minimum_required(VERSION 3.23)
|
||||||
project(memory LANGUAGES CXX)
|
project(memory LANGUAGES CXX)
|
||||||
|
|
||||||
include(FetchContent)
|
include(FetchContent)
|
||||||
|
@ -79,6 +79,6 @@ memory_game
|
||||||
Feel free to use your favorite IDE for this purpose, or use out-of-tree build, or Ninja, ...
|
Feel free to use your favorite IDE for this purpose, or use out-of-tree build, or Ninja, ...
|
||||||
We just keep it simple here for the purpose of this blog.
|
We just keep it simple here for the purpose of this blog.
|
||||||
|
|
||||||
*Note*: When configuring with CMake, the FetchContent module will fetch the source code of Slint via git.
|
_Note_: When configuring with CMake, the FetchContent module will fetch the source code of Slint via git.
|
||||||
this may take some time. When building for the first time, the first thing that need to be build
|
this may take some time. When building for the first time, the first thing that need to be build
|
||||||
is the Slint runtime and compiler, this can take a few minutes.
|
is the Slint runtime and compiler, this can take a few minutes.
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# Copyright © SixtyFPS GmbH <info@slint-ui.com>
|
# Copyright © SixtyFPS GmbH <info@slint-ui.com>
|
||||||
# SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-commercial
|
# SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-commercial
|
||||||
cmake_minimum_required(VERSION 3.19)
|
cmake_minimum_required(VERSION 3.23)
|
||||||
project(SlintExamples LANGUAGES CXX)
|
project(SlintExamples LANGUAGES CXX)
|
||||||
|
|
||||||
list(PREPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../cmake")
|
list(PREPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../cmake")
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Copyright © SixtyFPS GmbH <info@slint-ui.com>
|
# Copyright © SixtyFPS GmbH <info@slint-ui.com>
|
||||||
# SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-commercial
|
# SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-commercial
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.14)
|
cmake_minimum_required(VERSION 3.23)
|
||||||
project(slint_cpp_carousel LANGUAGES CXX)
|
project(slint_cpp_carousel LANGUAGES CXX)
|
||||||
|
|
||||||
if (NOT TARGET Slint::Slint)
|
if (NOT TARGET Slint::Slint)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Copyright © SixtyFPS GmbH <info@slint-ui.com>
|
# Copyright © SixtyFPS GmbH <info@slint-ui.com>
|
||||||
# SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-commercial
|
# SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-commercial
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.14)
|
cmake_minimum_required(VERSION 3.23)
|
||||||
project(slint_cpp_gallery LANGUAGES CXX)
|
project(slint_cpp_gallery LANGUAGES CXX)
|
||||||
|
|
||||||
if (NOT TARGET Slint::Slint)
|
if (NOT TARGET Slint::Slint)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Copyright © SixtyFPS GmbH <info@slint-ui.com>
|
# Copyright © SixtyFPS GmbH <info@slint-ui.com>
|
||||||
# SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-commercial
|
# SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-commercial
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.14)
|
cmake_minimum_required(VERSION 3.23)
|
||||||
project(slint_cpp_iot_dashboard LANGUAGES CXX)
|
project(slint_cpp_iot_dashboard LANGUAGES CXX)
|
||||||
|
|
||||||
if (NOT TARGET Slint::Slint)
|
if (NOT TARGET Slint::Slint)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Copyright © SixtyFPS GmbH <info@slint-ui.com>
|
# Copyright © SixtyFPS GmbH <info@slint-ui.com>
|
||||||
# SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-commercial
|
# SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-commercial
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.19)
|
cmake_minimum_required(VERSION 3.23)
|
||||||
project(memory LANGUAGES CXX)
|
project(memory LANGUAGES CXX)
|
||||||
|
|
||||||
if (NOT TARGET Slint::Slint)
|
if (NOT TARGET Slint::Slint)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Copyright © SixtyFPS GmbH <info@slint-ui.com>
|
# Copyright © SixtyFPS GmbH <info@slint-ui.com>
|
||||||
# SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-commercial
|
# SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-commercial
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.14)
|
cmake_minimum_required(VERSION 3.23)
|
||||||
project(opengl_cpp_underlay LANGUAGES CXX)
|
project(opengl_cpp_underlay LANGUAGES CXX)
|
||||||
|
|
||||||
if (NOT TARGET Slint::Slint)
|
if (NOT TARGET Slint::Slint)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Copyright © SixtyFPS GmbH <info@slint-ui.com>
|
# Copyright © SixtyFPS GmbH <info@slint-ui.com>
|
||||||
# SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-commercial
|
# SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-commercial
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.14)
|
cmake_minimum_required(VERSION 3.23)
|
||||||
project(slint_cpp_printer_demo LANGUAGES CXX)
|
project(slint_cpp_printer_demo LANGUAGES CXX)
|
||||||
|
|
||||||
if (NOT TARGET Slint::Slint)
|
if (NOT TARGET Slint::Slint)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Copyright © SixtyFPS GmbH <info@slint-ui.com>
|
# Copyright © SixtyFPS GmbH <info@slint-ui.com>
|
||||||
# SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-commercial
|
# SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-commercial
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.14)
|
cmake_minimum_required(VERSION 3.23)
|
||||||
project(slint_cpp_interpreter_printer_demo LANGUAGES CXX)
|
project(slint_cpp_interpreter_printer_demo LANGUAGES CXX)
|
||||||
|
|
||||||
if (NOT TARGET Slint::Slint)
|
if (NOT TARGET Slint::Slint)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Copyright © SixtyFPS GmbH <info@slint-ui.com>
|
# Copyright © SixtyFPS GmbH <info@slint-ui.com>
|
||||||
# SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-commercial
|
# SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-commercial
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.14)
|
cmake_minimum_required(VERSION 3.23)
|
||||||
|
|
||||||
if (NOT TARGET Slint::Slint)
|
if (NOT TARGET Slint::Slint)
|
||||||
find_package(Slint REQUIRED)
|
find_package(Slint REQUIRED)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Copyright © SixtyFPS GmbH <info@slint-ui.com>
|
# Copyright © SixtyFPS GmbH <info@slint-ui.com>
|
||||||
# SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-commercial
|
# SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-commercial
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.14)
|
cmake_minimum_required(VERSION 3.23)
|
||||||
project(qt_viewer LANGUAGES CXX)
|
project(qt_viewer LANGUAGES CXX)
|
||||||
|
|
||||||
if (NOT TARGET Slint::Slint)
|
if (NOT TARGET Slint::Slint)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Copyright © SixtyFPS GmbH <info@slint-ui.com>
|
# Copyright © SixtyFPS GmbH <info@slint-ui.com>
|
||||||
# SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-commercial
|
# SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-commercial
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.14)
|
cmake_minimum_required(VERSION 3.23)
|
||||||
project(slint_cpp_todo LANGUAGES CXX)
|
project(slint_cpp_todo LANGUAGES CXX)
|
||||||
|
|
||||||
if (NOT TARGET Slint::Slint)
|
if (NOT TARGET Slint::Slint)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue