From da1069123643b4bca5482ce1c972e7c715f60ce9 Mon Sep 17 00:00:00 2001 From: svin24 Date: Sat, 3 Jan 2026 11:46:58 +0200 Subject: [PATCH] Apply CMakeLists change from 9cff --- external/CMakeLists.txt | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt index 1b43f3b..c1825ee 100644 --- a/external/CMakeLists.txt +++ b/external/CMakeLists.txt @@ -9,14 +9,17 @@ set(BUILD_TESTS OFF) add_subdirectory(libcotp EXCLUDE_FROM_ALL) -include(FetchContent) -FetchContent_Declare( - Corrosion - GIT_REPOSITORY https://github.com/corrosion-rs/corrosion.git - GIT_TAG v0.5.2 -) - -FetchContent_MakeAvailable(Corrosion) +find_package(Corrosion QUIET) +if (NOT Corrosion_FOUND) + include(FetchContent) + FetchContent_Declare( + Corrosion + GIT_REPOSITORY https://github.com/corrosion-rs/corrosion.git + GIT_TAG v0.5.2 + ) + + FetchContent_MakeAvailable(Corrosion) +endif() corrosion_import_crate(MANIFEST_PATH ${CMAKE_CURRENT_SOURCE_DIR}/libphysis/Cargo.toml)