mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 18:58:36 +00:00
Use find_package to search for Corrosion (#7797)
First try to search for corrosion before fetching it
This commit is contained in:
parent
390f8aaf50
commit
be59032ecb
1 changed files with 11 additions and 7 deletions
|
@ -9,13 +9,17 @@ project(Slint HOMEPAGE_URL "https://slint.dev/" LANGUAGES C CXX VERSION 1.10.0)
|
|||
include(FeatureSummary)
|
||||
include(CMakeDependentOption)
|
||||
|
||||
include(FetchContent)
|
||||
FetchContent_Declare(
|
||||
Corrosion
|
||||
GIT_REPOSITORY https://github.com/corrosion-rs/corrosion.git
|
||||
GIT_TAG v0.5.1
|
||||
)
|
||||
FetchContent_MakeAvailable(Corrosion)
|
||||
find_package(Corrosion QUIET 0.5)
|
||||
if (NOT Corrosion_FOUND)
|
||||
include(FetchContent)
|
||||
FetchContent_Declare(
|
||||
Corrosion
|
||||
GIT_REPOSITORY https://github.com/corrosion-rs/corrosion.git
|
||||
GIT_TAG v0.5.1
|
||||
)
|
||||
|
||||
FetchContent_MakeAvailable(Corrosion)
|
||||
endif (NOT Corrosion_FOUND)
|
||||
|
||||
list(PREPEND CMAKE_MODULE_PATH ${Corrosion_SOURCE_DIR}/cmake)
|
||||
find_package(Rust 1.82 REQUIRED MODULE)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue