summaryrefslogtreecommitdiff
path: root/system/gd/rust/linux/client/build.rs
blob: ae291b0d1cee066192068ae65358f16c60d4100f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
use pkg_config::Config;

fn main() {
    let target_dir = std::env::var_os("CARGO_TARGET_DIR").unwrap();
    println!("cargo:rustc-link-search=native={}", target_dir.into_string().unwrap());

    // When cross-compiling, pkg-config is looking for dbus at the host libdir instead of the
    // sysroot. Adding this dependency here forces the linker to include the current sysroot's
    // libdir and fixes the build issues.
    Config::new().probe("dbus-1").unwrap();
    println!("cargo:rerun-if-changed=build.rs");
}