Skip to content

Commit

Permalink
Remove use of cfg!() for build.rs due to missing dependencies
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Carl Jones <[email protected]>
  • Loading branch information
dannycjones committed Nov 6, 2024
1 parent 8d9e2ac commit f58d50a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ fn main() {
#[cfg(all(not(feature = "libfuse"), not(target_os = "linux")))]
unimplemented!("Building without libfuse is only supported on Linux");

if cfg!(feature = "libfuse") {
#[cfg(not(feature = "libfuse"))]
{
println!("cargo:rustc-cfg=fuser_mount_impl=\"pure-rust\"");
}
#[cfg(feature = "libfuse")]
{
if cfg!(target_os = "macos") {
if pkg_config::Config::new()
.atleast_version("2.6.0")
Expand Down Expand Up @@ -42,7 +47,5 @@ fn main() {
println!("cargo:rustc-cfg=fuser_mount_impl=\"libfuse2\"");
}
}
} else {
println!("cargo:rustc-cfg=fuser_mount_impl=\"pure-rust\"");
}
}

0 comments on commit f58d50a

Please sign in to comment.