corrosion-rs / corrosion

Marrying Rust and CMake - Easy Rust and C/C++ Integration!
https://corrosion-rs.github.io/corrosion/
MIT License
1.02k stars 97 forks source link

Backport: Fix FindRust setting Rust_Found=false in wrong scope #530

Closed jschwe closed 1 month ago

jschwe commented 1 month ago

The macro _find_rust_failed is not called from inside any functions in FindRust. Find modules are included, so variables need to be set in local scope (which was already done in the successfull case).

Fixes #527

(cherry picked from commit 58d83f0c21c3dcde39ce60079ba5d901aafe7acc)