LadybirdBrowser / ladybird

Truly independent web browser
https://ladybird.org
BSD 2-Clause "Simplified" License
19.99k stars 827 forks source link

LibMedia: Add ffmpeg as a vcpkg dependency #291

Open trflynn89 opened 3 months ago

trflynn89 commented 3 months ago

Fixes #254

I've verified that LibMedia/CMakeLists.txt here works with both a system-installed and vcpkg-installed ffmpeg. I did have to blow away my CMake cache between switching.

Zaggy1024 commented 3 months ago

I would argue this doesn't really fix #254, we don't want to statically link FFmpeg. If this was building FFmpeg with vcpkg only when debug symbols/ASan were needed, then it would make a lot more sense to me.

trflynn89 commented 3 months ago

I would argue this doesn't really fix #254, we don't want to statically link FFmpeg. If this was building FFmpeg with vcpkg only when debug symbols/ASan were needed, then it would make a lot more sense to me.

What's the reason we need it to be a shared lib? That's not listed in the issue - it just gave the impression we weren't able to get linking to work with static libs.

IMO it'd be weird for ffmpeg to be the one dev dep that we sometimes use a system package, sometimes use vcpkg (or anything we might replace vcpkg with).

Zaggy1024 commented 3 months ago

What's the reason we need it to be a shared lib? That's not listed in the issue - it just gave the impression we weren't able to get linking to work with static libs.

IMO it'd be weird for ffmpeg to be the one dev dep that we sometimes use a system package, sometimes use vcpkg (or anything we might replace vcpkg with).

Just wrote down some reasons in a comment there.

trflynn89 commented 3 months ago

Got it, if it's a legal issue, then that's that.

Looking at https://github.com/microsoft/vcpkg/discussions/19127, it seems we can create shared library builds with vcpkg triplets, so I'll look into that.