cmake-rs
cmake-rs copied to clipboard
Rust build dependency for running cmake
The [current API](https://docs.rs/cmake/0.1.45/src/cmake/lib.rs.html#337-340) only allows specifying a single build target. However, the `cmake` CLI allows specifying multiple targets. ``` --target ..., -t ... Build instead of the default target. Multiple...
CMake has [`find_package`](https://cmake.org/cmake/help/latest/command/find_package.html) mechanism, which allows using installed packages. It would be nice if this could be used and only falling back to building the dependency ourselves if it system...
As of version 3.14, cmake has added support for cross compiling iOS (see https://cmake.org/cmake/help/latest/release/3.14.html?highlight=cross#platforms). This means that `-miphone-version-min` style parameters get added automatically. This also means that currently when using...
https://github.com/rust-lang/rust/blob/master/RELEASES.md#compiler-1 > You can now use -C target-feature=+crt-static on linux-gnu targets. Note: If you're using cargo you must explicitly pass the --target flag. But when I run > RUSTFLAGS="-C target-feature=+crt-static"...
We are working with a project in which setting any cmake c flags causes cmake to end up with the incorrect set of flags. This adds an option to disable...
I use something like this in my `build.rs`: ```rust let dst = cmake::Config::new(Path::new("couchbase-lite-core")) .define("DISABLE_LTO_BUILD", "True") .define("MAINTAINER_MODE", "False") .define("ENABLE_TESTING", "False") .build_target("all") .build() .join("build"); ``` all fine, until user changed CC/CXX environment...
I believe https://github.com/alexcrichton/cmake-rs/pull/93 ended up causing https://github.com/alexcrichton/cmake-rs/issues/95 by accident so I've [reverted that change](https://github.com/alexcrichton/cmake-rs/commit/9a53f43ed9d338389950655738a9360cbfe27d01) while this is sorted through. @simlay would you be able to look into this?
I was able to get this to work once using CMake `install` commands, but it would be really nice if there was a *minimal* working cmake that put a C...
here my build.rs ``` rust extern crate cmake; fn main() { let dst = cmake::Config::new("librtmp").build_target("rtmp").build(); if cfg!(any(windows)) { println!("cargo:rustc-link-search=native={}/build/Release", dst.display()); } else { println!("cargo:rustc-link-search=native={}/build", dst.display()); } println!("cargo:rustc-link-lib=static=rtmp"); } ``` if...
cmake-rs tries to translate cargo settings to cmake settings, but there are two cases where the debuginfio settings are ignored. The first is opt-level=0 + debug=false. This picks the CMake...