Brian Silverman | 4e662aa | 2022-05-11 23:10:19 -0700 | [diff] [blame] | 1 | // Copyright 2021 Google LLC |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or |
| 4 | // https://www.apache.org/licenses/LICENSE-2.0> or the MIT license |
| 5 | // <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your |
| 6 | // option. This file may not be copied, modified, or distributed |
| 7 | // except according to those terms. |
| 8 | |
| 9 | fn main() -> miette::Result<()> { |
| 10 | let path = std::path::PathBuf::from("src"); |
| 11 | let mut b = autocxx_build::Builder::new("src/main.rs", &[&path]).build()?; |
| 12 | b.flag_if_supported("-std=c++17") // clang |
| 13 | .flag_if_supported("/std:c++17") // msvc |
| 14 | .file("src/fake-chromium-src.cc") |
| 15 | .compile("autocxx-fake-render-frame-host-example"); |
| 16 | println!("cargo:rerun-if-changed=src/main.rs"); |
| 17 | println!("cargo:rerun-if-changed=src/fake-chromium-src.cc"); |
| 18 | println!("cargo:rerun-if-changed=src/fake-chromium-header.h"); |
| 19 | Ok(()) |
| 20 | } |