2024-03-10 12:42:56 +01:00
|
|
|
#[cfg(feature = "js")]
|
|
|
|
extern crate napi_build;
|
|
|
|
|
2024-09-19 21:32:46 +02:00
|
|
|
#[cfg(any(feature = "py", feature = "py-noabi"))]
|
2024-03-16 14:36:41 +01:00
|
|
|
extern crate pyo3_build_config;
|
|
|
|
|
2024-03-09 23:27:08 +01:00
|
|
|
/// The main method of the buildscript, required by some glue modules.
|
|
|
|
fn main() {
|
2024-03-16 14:36:41 +01:00
|
|
|
#[cfg(feature = "js")]
|
|
|
|
{
|
2024-03-10 12:42:56 +01:00
|
|
|
napi_build::setup();
|
|
|
|
}
|
2024-03-16 14:36:41 +01:00
|
|
|
|
2024-09-19 21:32:46 +02:00
|
|
|
#[cfg(any(feature = "py", feature = "py-noabi"))]
|
2024-03-16 14:36:41 +01:00
|
|
|
{
|
|
|
|
pyo3_build_config::add_extension_module_link_args();
|
|
|
|
}
|
2024-09-25 21:32:01 +02:00
|
|
|
|
|
|
|
#[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");
|
|
|
|
}
|
|
|
|
}
|
2024-03-09 23:27:08 +01:00
|
|
|
}
|