Skip to content

Commit 40ad031

Browse files
author
Jason Mobarak
authored
build.rs: set CMAKE_INSTALL_PREFIX (#51)
1 parent a2a1fca commit 40ad031

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

build.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
extern crate bindgen;
22

3-
use cmake::Config;
43
use std::env;
54
use std::path::PathBuf;
65

76
fn main() {
8-
let dst = Config::new("third-party/libswiftnav/").build();
7+
let mut cmake = cmake::Config::new("third-party/libswiftnav/");
8+
let out_dir = env::var("OUT_DIR").unwrap();
9+
10+
cmake
11+
.profile("Release")
12+
.define("CMAKE_INSTALL_PREFIX", out_dir);
13+
14+
let dst = cmake.build();
915

1016
println!("cargo:rustc-link-search=native={}/lib/", dst.display());
1117
println!("cargo:rustc-link-lib=static=swiftnav");

0 commit comments

Comments
 (0)