diff options
| author | Fenrir <[email protected]> | 2017-07-13 23:45:50 -0700 |
|---|---|---|
| committer | Fenrir <[email protected]> | 2017-07-14 10:30:22 -0700 |
| commit | 22a855e41a66cc6d4c4c8feee5fb679daa6273a2 (patch) | |
| tree | 3d1253c9689fcd11eeda28a914370546c5f0286d | |
| parent | Update bindings for libctru 1.3.0 (diff) | |
| download | ctru-rs-22a855e41a66cc6d4c4c8feee5fb679daa6273a2.tar.xz ctru-rs-22a855e41a66cc6d4c4c8feee5fb679daa6273a2.zip | |
Use -lctrud for debug builds
| -rw-r--r-- | ctru-rs/build.rs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/ctru-rs/build.rs b/ctru-rs/build.rs index 4a4d627..cded1d0 100644 --- a/ctru-rs/build.rs +++ b/ctru-rs/build.rs @@ -1,7 +1,11 @@ use std::env; -use std::path::PathBuf; fn main() { - let dkp_path = PathBuf::from(env::var("DEVKITPRO").unwrap()); - println!("cargo:rustc-link-search=native={}", dkp_path.join("libctru/lib").display()); + let dkp_path = env::var("DEVKITPRO").unwrap(); + + println!("cargo:rustc-link-search=native={}/libctru/lib", dkp_path); + println!("cargo:rustc-link-lib=static={}", match env::var("PROFILE").unwrap().as_str() { + "debug" => "ctrud", + _ => "ctru", + }); } |