From 1dffa9cc165cb12b67370cb27387cf9ca502c6ea Mon Sep 17 00:00:00 2001 From: Fenrir Date: Sun, 11 Feb 2018 02:33:17 -0700 Subject: Link libctru in ctru-sys Allows debug builds to compile without throwing out random linker errors. Plus it probably should have been this way the whole time anyway. --- ctru-rs/Cargo.toml | 1 - ctru-rs/build.rs | 11 ----------- ctru-sys/build.rs | 11 +++++++++++ 3 files changed, 11 insertions(+), 12 deletions(-) delete mode 100644 ctru-rs/build.rs create mode 100644 ctru-sys/build.rs diff --git a/ctru-rs/Cargo.toml b/ctru-rs/Cargo.toml index c597f4a..f93902c 100644 --- a/ctru-rs/Cargo.toml +++ b/ctru-rs/Cargo.toml @@ -3,7 +3,6 @@ authors = ["Ronald Kinard "] description = "A safe wrapper around smealum's ctrulib." license = "https://en.wikipedia.org/wiki/Zlib_License" name = "ctru-rs" -links = "ctru" version = "0.7.0" [lib] diff --git a/ctru-rs/build.rs b/ctru-rs/build.rs deleted file mode 100644 index cded1d0..0000000 --- a/ctru-rs/build.rs +++ /dev/null @@ -1,11 +0,0 @@ -use std::env; - -fn main() { - 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", - }); -} diff --git a/ctru-sys/build.rs b/ctru-sys/build.rs new file mode 100644 index 0000000..cded1d0 --- /dev/null +++ b/ctru-sys/build.rs @@ -0,0 +1,11 @@ +use std::env; + +fn main() { + 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", + }); +} -- cgit v1.2.3