#cargo-build #build-script #build-dependencies #cargo-metadata #macos #linux-macos #linux

build vcpkg_rs_mf

A library to find native dependencies in a vcpkg tree at build time in order to be used in Cargo build scripts

2 releases

Uses old Rust 2015

0.3.1 Aug 12, 2024
0.3.0 Aug 12, 2024

#253 in Build Utils

MIT/Apache

230KB
2K SLoC

vcpkg-rs Windows macOS Linux WASM

Documentation Changelog

This is a helper for finding libraries in a Vcpkg installation from cargo build scripts. It works similarly to pkg-config. It works on Windows (MSVC ABI), Linux and MacOS.

Example

Find the library named foo in a Vcpkg installation and emit cargo metadata to link it:

// build.rs
fn main() {
    vcpkg_rs_mf::find_package("foo").unwrap();
}

See the crate documentation for more information. See cargo-vcpkg for a convenient way of creating a vcpkg installation.

License

See LICENSE-APACHE, and LICENSE-MIT for details.

No runtime deps