You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a CMake library that conditionally adds link time dependencies based on the output of a check_cxx_source_compiles command. That's all fine when building a CMake project, but when building a Cargo library I need to add a line like this into build.rs:
println!("cargo:rustc-link-lib=framework=XXX");
To mimic the behaviour of the CMake library, I will need to somehow retrieve the value of the variable that is set by the check_cxx_source_compiles command. That might not be possible directly, but it should be possible determine the value by reading (in build.rs) the output of the CMake configure command.
Is there a way to go about doing that? Or more generally, does cmake-rs have a good way to get information back from CMake after the CMake library is configured?
The text was updated successfully, but these errors were encountered:
As far as I can tell, this crate is currently only driving the configuration/building process, so it does not have access to any information like that.
I have a CMake library that conditionally adds link time dependencies based on the output of a
check_cxx_source_compiles
command. That's all fine when building a CMake project, but when building a Cargo library I need to add a line like this into build.rs:To mimic the behaviour of the CMake library, I will need to somehow retrieve the value of the variable that is set by the
check_cxx_source_compiles
command. That might not be possible directly, but it should be possible determine the value by reading (in build.rs) the output of the CMake configure command.Is there a way to go about doing that? Or more generally, does cmake-rs have a good way to get information back from CMake after the CMake library is configured?
The text was updated successfully, but these errors were encountered: