1

Added a "dylib" feature flag, that enables linking with raylib

dynamically instead of statically
This commit is contained in:
InvalidString 2023-10-16 16:13:45 +02:00
parent e93f846280
commit e3daf66f65
2 changed files with 8 additions and 2 deletions

View File

@ -27,4 +27,5 @@ regex = "1"
[features] [features]
default = ["macros"] default = ["macros"]
macros = [] macros = []
dylib = []

View File

@ -68,7 +68,12 @@ pub fn link_libs() {
} }
// Link raylib itself // Link raylib itself
println!("cargo:rustc-link-lib=static=raylib"); if cfg!(feature = "dylib") {
println!("cargo:rustc-link-lib=dylib=raylib");
}
else {
println!("cargo:rustc-link-lib=static=raylib");
}
} }
/// Generates `bindings.rs` file /// Generates `bindings.rs` file