rust
bindgen::Builder::merge_cc_args(&self, &pkg_config::Library)
This crate exports CcArgs
and MergeCcArgs
.
It provides linkpaths, includepaths, frameworkpaths, frameworks, libs, ldargs and defines.
It provides the method merge_cc_args
that accept a CcArgs
implementation.
CcArgs
for pkg_config::Library
MergeCcArgs
for cc::Build
MergeCcArgs
for bindgen::Builder
build.rs
```rust
use std::path::PathBuf;
use ccargs::{bindgen, pkgconfig, MergeCcArgs};
fn main() { let outpath = PathBuf::from(std::env::var("OUTDIR").unwrap()); println!("cargo:rerun-if-changed=wrapper.h"); bindgen::Builder::default() .mergeccargs(&pkgconfig::probelibrary("libzstd").unwrap()) .header("wrapper.h") .parsecallbacks(Box::new(bindgen::CargoCallbacks)) .generate() .unwrap() .writetofile(outpath.join("bindings.rs")) .unwrap(); } ```