Open vcup opened 10 months ago
Thanks for your information. I'll enhance the doc later.
Currently, [env]
in config.toml does not support specifying os and arch.
https://github.com/rust-lang/cargo/issues/10273 https://github.com/rust-lang/cargo/issues/10789
You can use feature link_system_ffmpeg
which will use pkg-config
to find the ffmpeg https://github.com/CCExtractor/rusty_ffmpeg/blob/1c6a1f58355cdd22248f534f32b6bc143f8ffde4/build.rs#L409-L411 and set
[env]
PKG_CONFIG_PATH_x86_64-unknown-linux-gnu = { value = "target/vcpkg/installed/x64-linux-release/lib/pkgconfig", relative = true }
PKG_CONFIG_PATH_x86_64-apple-darwin = { value = "target/vcpkg/installed/x64-osx-release/lib/pkgconfig", relative = true }
PKG_CONFIG_PATH_aarch64-apple-darwin = { value = "target/vcpkg/installed/arm64-osx-release/lib/pkgconfig", relative = true }
On Windows, set
[env]
# Only Windows uses vcpkg linking.
VCPKG_ROOT = { value = "target/vcpkg", relative = true }
VCPKGRS_TRIPLET = { value = "x64-windows-static-release" }
This way has serval benefits, for example.
config.toml look like below.
useful links: .cargo/config.toml section detail thread on stackoverflow