Crates.io | cmk |
lib.rs | cmk |
version | 0.1.2 |
source | src |
created_at | 2024-10-08 21:10:57.53915 |
updated_at | 2024-10-09 09:50:46.70493 |
description | A build dependency for running `cmake` to build a native library |
homepage | https://github.com/MoAlyousef/cmk |
repository | https://github.com/MoAlyousef/cmk |
max_upload_size | |
id | 1401691 |
size | 9,897 |
A simpler implementation of cmake-rs which assumes a recent enough version of CMake.
# Cargo.toml
[build-dependencies]
cmk = "0.1"
// 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");
}