Skip to content

Commit

Permalink
Add missing build.rs script for nafcodec-py
Browse files Browse the repository at this point in the history
  • Loading branch information
althonos committed Apr 24, 2024
1 parent aec7404 commit 6c10994
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions nafcodec-py/nafcodec/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
extern crate built;

fn main() {
let dst = std::env::var("OUT_DIR")
.map(std::path::PathBuf::from)
.expect("OUT_DIR not set")
.join("built.rs");
let project_dir = std::env::var("CARGO_MANIFEST_DIR")
.map(std::path::PathBuf::from)
.expect("CARGO_MANIFEST_DIR");

eprintln!(
"{:?}",
std::env::var("CARGO_MANIFEST_DIR").expect("CARGO_MANIFEST_DIR")
);
built::write_built_file_with_opts(Some(&project_dir.parent().unwrap()), &dst)
.expect("Failed to acquire build-time information");
}

0 comments on commit 6c10994

Please sign in to comment.