Closed ns-mkusper closed 1 month ago
Is this limitation intentional?
Nope, this is not intentional.
vcpkg
is not widely adopted by linux and macOS users as the autotools work well(the fact that its creator is Microsoft makes the adoption even harder I guess :-P). Therefore, I didn't consider this on these platforms.
I'd like to use vcpkg as the way to setup FFmpeg for my project on both Linux, Windows and Mac. It seems to, at the very least, install FFmpeg successfully on each of these platforms.
Yeah, it would be great if you could add vcpkg linking support for non-Windows targets!
You can extract this code block as a function and reuse it at the end of non-windows logic: https://github.com/CCExtractor/rusty_ffmpeg/blob/19557c86873e239449660966007e05bdf7f44edf/build.rs#L432-L441
Then guard the function calls and the vcpkg dependency with a feature called link_vcpkg_ffmpeg
, which conflicts with link_system_ffmpeg
. Windows vcpkg linking should also be gated with this feature for consistency.
@ldm0 Cool, thanks! Seems to work just fine on my end. Opened #118 to upstream it.
This project seems (according to the docs and this part of the code) to only allow for linking FFmpeg with vcpkg on Windows.
Is this limitation intentional? Happy to open a PR to allow linking via vcpkg for non-windows targets but before I begin work on it I wanted to check to see if there was some reasoning I was simply missing here.
I'd like to use vcpkg as the way to setup FFmpeg for my project on Linux, Windows and Mac. It seems to, at the very least, install FFmpeg successfully on each of these platforms.