Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support specifying VCPKGRS_* environmental variables from Config #19

Closed
ryankurte opened this issue Jul 21, 2020 · 3 comments
Closed

Support specifying VCPKGRS_* environmental variables from Config #19

ryankurte opened this issue Jul 21, 2020 · 3 comments

Comments

@ryankurte
Copy link

Hey there,

Would it be possible to configure the VCPKGRS_* environmental variables from the Config object exposed by the library, with the library setting overridden by the environment?

This would allow us to manage this for different targets in build.rs, aiming to simplify the build process for *-sys crate consumers.

Somewhat related issue: rust-embedded#481

Cheers,

Ryan

@mcgoo
Copy link
Owner

mcgoo commented Jul 21, 2020

I'm open to the idea, for sure. I assume you are mainly wanting to select which vcpkg triplet to build with? At the moment I think there is no way to do that but I think it would not be a big deal to support it.

@mcgoo
Copy link
Owner

mcgoo commented Jan 14, 2021

This is now supported from builds.rs as you suggested. It's typically better to use the environment variables because it can be a requirement that all external dependencies come from the same vcpkg installation and use the same triplet.

There is also a new tool cargo vcpkg that allows the triplet and required packages to be specified as metadata in Cargo.toml. If required it will create a vcpkg tree from scratch, so cargo vcpkg build && cargo build can be enough to get up and running.

(Please let me know if this doesn't address your need.)

@mcgoo mcgoo closed this as completed Jan 14, 2021
@ryankurte
Copy link
Author

awesome, thanks! i'll try it out next i'm playing with CI tooling

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants