cmk

Crates.iocmk
lib.rscmk
version0.1.2
sourcesrc
created_at2024-10-08 21:10:57.53915
updated_at2024-10-09 09:50:46.70493
descriptionA build dependency for running `cmake` to build a native library
homepagehttps://github.com/MoAlyousef/cmk
repositoryhttps://github.com/MoAlyousef/cmk
max_upload_size
id1401691
size9,897
Mohammed Alyousef (MoAlyousef)

documentation

https://docs.rs/cmk

README

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");
}
Commit count: 5

cargo fmt