#build-dependencies #cmake #running #native

build cmk

A build dependency for running cmake to build a native library

3 releases

0.1.2 Oct 9, 2024
0.1.1 Oct 9, 2024
0.1.0 Oct 8, 2024

#171 in Build Utils

Download history 476/week @ 2024-10-05 119/week @ 2024-10-12 1402/week @ 2024-10-19 7243/week @ 2024-10-26 7740/week @ 2024-11-02 5525/week @ 2024-11-09 10638/week @ 2024-11-16 10020/week @ 2024-11-23 7754/week @ 2024-11-30

35,150 downloads per month
Used in 54 crates (via fltk-sys)

MIT license

9KB
157 lines

cmk

A simpler implementation of cmake-rs which assumes a recent enough version of CMake.

Usage

# Cargo.toml
[build-dependencies]
cmk = "0.1"

Example

// build.rs
fn main() {
    let dst = cmk::Config::new("cpplib")
        .generator("Ninja")
        .profile("Release")
        .define("SOME_CMAKE_OPTION", "ON")
        .build();
    println!("cargo:rustc-link-search=native={}", dst.display());
    println!("cargo:rustc-link-lib=static=cpplib");
}

No runtime deps