Rename SLINT_TARGET_CARGO_FLAGS to SLINT_LIBRARY_CARGO_FLAGS

This commit is contained in:
Olivier Goffart 2023-08-30 13:04:23 +02:00 committed by Olivier Goffart
parent 4920224be0
commit fd60d08f7b
4 changed files with 6 additions and 6 deletions

View file

@ -41,7 +41,7 @@ All notable changes to this project are documented in this file.
### C++
- Added Platform API to write your own platform that drives its own event loop.
- Added `SLINT_TARGET_CARGO_FLAGS` cmake variable.
- Added `SLINT_LIBRARY_CARGO_FLAGS` cmake variable.
- Added `ReverseModel`.
- Added functions in Window to dispatch pointer events.
- The `slint_interpreter.h` file was renamed `slint-interpreter.h`, a deprecated header was added.

View file

@ -38,10 +38,10 @@ endif()
corrosion_import_crate(MANIFEST_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../Cargo.toml"
CRATES slint-cpp ${slint_compiler_crate} CRATE_TYPES bin ${rustc_lib_type})
set(SLINT_TARGET_CARGO_FLAGS "" CACHE STRING
set(SLINT_LIBRARY_CARGO_FLAGS "" CACHE STRING
"Flags to pass to cargo when building the Slint runtime library")
if(SLINT_TARGET_CARGO_FLAGS)
corrosion_set_cargo_flags(slint-cpp ${SLINT_TARGET_CARGO_FLAGS})
if(SLINT_LIBRARY_CARGO_FLAGS)
corrosion_set_cargo_flags(slint-cpp ${SLINT_LIBRARY_CARGO_FLAGS})
endif()

View file

@ -105,7 +105,7 @@ This works when compiling Slint as a package, using `cmake --build` and
Slint uses [Corrosion](https://github.com/corrosion-rs/corrosion) to build Slint, which is developed in Rust. You can utilize [Corrosion's global CMake variables](https://corrosion-rs.github.io/corrosion/usage.html#global-corrosion-options) to control certain aspects of the Rust build process.
Furthermore, you can set the `SLINT_TARGET_CARGO_FLAGS` cache variable to specify additional flags for the Slint runtime during the build.
Furthermore, you can set the `SLINT_LIBRARY_CARGO_FLAGS` cache variable to specify additional flags for the Slint runtime during the build.
### Platform Backends

View file

@ -16,7 +16,7 @@ endif(CONFIG_IDF_TARGET_ARCH_XTENSA)
set(CORROSION_NO_WARN_PARSE_TARGET_TRIPLE_FAILED ON)
set(SLINT_FEATURE_FREESTANDING ON)
set(SLINT_FEATURE_RENDERER_SOFTWARE ON)
set(SLINT_TARGET_CARGO_FLAGS "-Zbuild-std=core,alloc")
set(SLINT_LIBRARY_CARGO_FLAGS "-Zbuild-std=core,alloc")
set(DEFAULT_SLINT_EMBED_RESOURCES "embed-for-software-renderer" CACHE STRING "")
set(CMAKE_BUILD_TYPE Release)
set(BUILD_SHARED_LIBS OFF)