A classic roguelike set in a classic roguelike setting. https://nc.itch.io/dragons-dungeon
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
864B

  1. fn main() {
  2. if cfg!(windows) {
  3. use std::path::PathBuf;
  4. let mut lib_path = PathBuf::from(std::env::var("CARGO_MANIFEST_DIR").unwrap());
  5. lib_path.push("lib");
  6. lib_path.push("windows");
  7. if cfg!(target_arch = "x86_64") {
  8. lib_path.push("x64");
  9. } else if cfg!(target_arch = "x86") {
  10. lib_path.push("x86");
  11. } else {
  12. panic!("Non-x86 Windows platforms are not supported.");
  13. }
  14. println!("cargo:rustc-link-search=all={}", lib_path.display());
  15. let mut out_path = PathBuf::from(std::env::var("OUT_DIR").unwrap());
  16. out_path.pop(); // /out/
  17. out_path.pop(); // /some-hashed-folder/
  18. out_path.pop(); // /build/
  19. out_path.push("SDL2.dll");
  20. lib_path.push("SDL2.dll");
  21. std::fs::copy(lib_path, out_path).ok();
  22. }
  23. }