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

Add ability to enable features on vcpkg packages? #16

Open
griffi-gh opened this issue Dec 8, 2022 · 1 comment
Open

Add ability to enable features on vcpkg packages? #16

griffi-gh opened this issue Dec 8, 2022 · 1 comment

Comments

@griffi-gh
Copy link

For example I need to enable x11 feature on sdl2 to make it compile on Linux, but I can't find a way to do it.

@waych
Copy link
Collaborator

waych commented Dec 8, 2022

You should already be able to list explicit vcpkg dependencies via Cargo.toml by including them in square brackets. E.g:

[package.metadata.vcpkg]
dependencies = ["sdl2[x11]"]

This may not be what you are looking for however. In my experience, the sdl2 vcpkg port is not a hermetic build, and is reliant on the backends' development headers to be properly installed on the build host. Current microsoft/vcpkg seems to build and work with x11 just fine for me without specifying the feature directly. To make it work, I have to install the following packages (on Debian) as prep for the build:

apt install libfreetype-dev libxext-dev libxxf86vm-dev libgl-dev pkg-config

Note that the developer dependency on libxxf86vm-dev seemed rather new to me.

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