Skip to content

Commit

Permalink
Fix build script
Browse files Browse the repository at this point in the history
  • Loading branch information
360tetsu360 committed Aug 23, 2024
1 parent d0dab51 commit 829d0c6
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions solver/build.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
use std::env;

const C_SOURCE: [&str; 64] = [
// qfits
"ext/astrometry/qfits-an/anqfits.c",
Expand Down Expand Up @@ -74,6 +76,7 @@ const C_SOURCE: [&str; 64] = [

fn main() {
println!("cargo::rerun-if-changed=ext");
let build_dir = env::var("GITHUB_WORKSPACE").unwrap_or("/atomskygaze".to_string());
cc::Build::new()
.warnings(false)
.extra_warnings(false)
Expand All @@ -85,8 +88,17 @@ fn main() {
.include("ext/astrometry")
.include("ext/astrometry/include")
.include("ext/astrometry/include/astrometry")
.include(format!(
"{}/build/buildroot-2024.02/output/staging/usr/include",
build_dir
))
.compile("stellarsolver");

println!(
"cargo:rustc-link-search=native={}/build/buildroot-2024.02/output/target/usr/lib",
build_dir
);

println!("cargo:rustc-link-lib=gsl");
println!("cargo:rustc-link-lib=gslcblas");
}

0 comments on commit 829d0c6

Please sign in to comment.