mirror of
https://github.com/hexedtech/codemp.git
synced 2025-03-15 03:25:31 +01:00
* chore: changed features layout now using `dep:` and `crate?/feat` syntaxes (introduced in rust 1.60). this may mess with lua rockspec
26 lines
552 B
Rust
26 lines
552 B
Rust
#[cfg(feature = "js")]
|
|
extern crate napi_build;
|
|
|
|
#[cfg(feature = "py")]
|
|
extern crate pyo3_build_config;
|
|
|
|
/// The main method of the buildscript, required by some glue modules.
|
|
fn main() {
|
|
#[cfg(feature = "js")]
|
|
{
|
|
napi_build::setup();
|
|
}
|
|
|
|
#[cfg(feature = "py")]
|
|
{
|
|
pyo3_build_config::add_extension_module_link_args();
|
|
}
|
|
|
|
#[cfg(feature = "lua")]
|
|
{
|
|
if let Ok("macos") = std::env::var("CARGO_CFG_TARGET_OS").as_deref() {
|
|
println!("cargo:rustc-cdylib-link-arg=-undefined");
|
|
println!("cargo:rustc-cdylib-link-arg=dynamic_lookup");
|
|
}
|
|
}
|
|
}
|