File: build.rs

package info (click to toggle)
rust-esaxx-rs 0.1.10-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 640 kB
  • sloc: cpp: 8; makefile: 2
file content (30 lines) | stat: -rw-r--r-- 674 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#[cfg(feature = "cpp")]
#[cfg(not(target_os = "macos"))]

use std::env;
fn main() {
    println!("dh-cargo:deb-built-using=esaxx=0={}", env::var("CARGO_MANIFEST_DIR").unwrap());
    cc::Build::new()
        .cpp(true)
        .flag("-std=c++11")
        .static_crt(true)
        .file("src/esaxx.cpp")
        .include("src")
        .compile("esaxx");
}

#[cfg(feature = "cpp")]
#[cfg(target_os = "macos")]
fn main() {
    cc::Build::new()
        .cpp(true)
        .flag("-std=c++11")
        .flag("-stdlib=libc++")
        .static_crt(true)
        .file("src/esaxx.cpp")
        .include("src")
        .compile("esaxx");
}

#[cfg(not(feature = "cpp"))]
fn main() {}