godot/modules/ogg/SCsub
Rémi Verschelde ae74e78909
Remove WebM support (and deps libvpx and opus)
We've had many issues with WebM support and specifically the libvpx library
over the years, mostly due to its poor integration in Godot's buildsystem,
but without anyone really interested in improving this state.

With the new GDExtensions in Godot 4.0, we intend to move video decoding to
first-party extensions, and this would likely be done using something like
libvlc to expose more codecs.

Removing the `webm` module means we can remove libsimplewebm, libvpx and
opus, which we were only used for that purpose. Both libvpx and opus were
fairly complex pieces of the buildsystem, so this is a nice cleanup.

This also removes the compile-time dependency on `yasm`.

Fixes lots of compilation or non-working WebM issues which will be linked
in the PR.
2021-10-15 12:09:11 +02:00

37 lines
848 B
Python

#!/usr/bin/env python
Import("env")
Import("env_modules")
env_ogg = env_modules.Clone()
# Thirdparty source files
thirdparty_obj = []
if env["builtin_libogg"]:
thirdparty_dir = "#thirdparty/libogg/"
thirdparty_sources = [
"bitwise.c",
"framing.c",
]
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
env_ogg.Prepend(CPPPATH=[thirdparty_dir])
env_thirdparty = env_ogg.Clone()
env_thirdparty.disable_warnings()
env_thirdparty.add_source_files(thirdparty_obj, thirdparty_sources)
env.modules_sources += thirdparty_obj
# Godot source files
module_obj = []
env_ogg.add_source_files(module_obj, "*.cpp")
env.modules_sources += module_obj
# Needed to force rebuilding the module files when the thirdparty library is updated.
env.Depends(module_obj, thirdparty_obj)