Struct cmake::Config [] [src]

pub struct Config {
    // some fields omitted
}

Builder style configuration for a pending CMake build.

Methods

impl Config
[src]

fn new<P: AsRef<Path>>(path: P) -> Config

Creates a new blank set of configuration to build the project specified at the path path.

fn cflag<P: AsRef<OsStr>>(&mut self, flag: P) -> &mut Config

Adds a custom flag to pass down to the compiler, supplementing those that this library already passes.

fn define<K, V>(&mut self, k: K, v: V) -> &mut Config where K: AsRef<OsStr>, V: AsRef<OsStr>

Adds a new -D flag to pass to cmake during the generation step.

fn register_dep(&mut self, dep: &str) -> &mut Config

Registers a dependency for this compilation on the native library built by Cargo previously.

This registration will modify the CMAKE_PREFIX_PATH environment variable for the build system generation step.

fn build(&mut self) -> PathBuf

Run this configuration, compiling the library with all the configured options.

This will run both the build system generator command as well as the command to build the library.