mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 18:58:36 +00:00
Fix C++ memory game tutorial not starting out of the box on Windows
After commit 3e5aa212d5
the Slint DLLs
aren't placed in the `bin/` directory by default anymore. Since the
tutorial builds Slint as an external sub-project, it is entirely
isolated and the CMAKE_*_OUTPUT_DIRECTORY variables do not propagate. On
macOS and Linux, the program still runs due to rpath. On Windows, the
instructions said to put `bin` into `%PATH%`, but that doesn't work
anymore, the dll is now in `_deps/slint-build`.
Instead of adjusting `%PATH%`, this change adjusts the documentation to
recommend the use of a custom command on Windows using
$<TARGET_RUNTIME_DLLS:tgt> to copy the DLL across. This is guarded with
WIN32 due to https://gitlab.kitware.com/cmake/cmake/-/issues/23543 ,
where the proposed solution requires CMake 3.26 (not released yet).
This commit is contained in:
parent
d50e76f48a
commit
3c65c6177d
5 changed files with 19 additions and 13 deletions
|
@ -34,7 +34,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
|
||||
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.
|
||||
* **[cmake](https://cmake.org/download/)** (3.19 or newer)
|
||||
* **[cmake](https://cmake.org/download/)** (3.21 or newer)
|
||||
* 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`](https://cmake.org/cmake/help/latest/module/FetchContent.html) feature.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue