Devolutions / conan-rs

A Rust wrapper of the conan C/C++ package manager (conan.io) to simplify usage in build scripts
Apache License 2.0
34 stars 11 forks source link

Enable specifying build settings #6

Closed taco-paco closed 1 year ago

taco-paco commented 1 year ago

Motivation is to be able to specify target triplets

awakecoding commented 1 year ago

Thank you for taking the time to improve conan-rs!

I originally hesitated a little bit, because moving the build_type to BuildSettings is a minor breaking change, but I think it's all for the best. Even if build_type is the most common setting you need to pass, we still detect the default value from cargo environment variables, and overriding it is not too difficult with BuildSettings.

In my case, most settings are passed through conan profiles, but I do get your point about passing target triplets. I modified my own conan profiles for Linux to add a custom "distro" setting which are built against distro-specific sysroots (ubuntu-20.04, ubuntu-22.04, etc). Your change would actually make it easier to pass custom settings.

For reference, here are our conan recipes: https://github.com/Devolutions/conan-public

our conan settings/profiles can be found here: https://github.com/Devolutions/conan-public/tree/master/settings

I will merge those changes. Did you intend to make more changes, or should it be released as conan-rs 0.3.0?

awakecoding commented 1 year ago

@taco-paco I published conan 0.3.0 with an updated readme, if you need to make more changes, we'll just make another release: https://crates.io/crates/conan