This is a useful function in a generic context or with types that
overload unary operator&. However, primitives and pointers will never do
this, so we can opt for a more straightforward syntax.
Sets YUZU_USE_BUNDLED_FFMPEG as a CMake dependent option that is OFF on
Linux and ON for WIN32 targets. If FFmpeg is not found when
YUZU_USE_BUNDLED_FFMPEG is OFF, the bundled module/binaries are used
instead.
Reverts earlier changes to FindFFmpeg a bit, mostly to keep parity with
it's Citra version a bit. Now _FFmpeg_ALL_COMPONENTS lists all
components. We overwrite FFmpeg_LIBRARIES and FFmpeg_INCLUDE_DIR after
using the module.
Tells CMake to look for either nasm or yasm as it is required to build
FFmpeg. Avoids a compile-time error by checking for it during
configuration.
Adds a workaround for Ubuntu Bionic's old version of make not
communicating jobserver details properly.
Also renames related CMake variables to match both the Find*FFmpeg* and
variables defined within the file. Fixes odd errors produced by the old
FindFFmpeg.
Citra's FindFFmpeg is slightly modified here: adds Citra's copyright at
the beginning, renames FFmpeg_INCLUDES to FFmpeg_INCLUDE_DIR, disables a
few components in _FFmpeg_ALL_COMPONENTS, and adds the missing avutil
component to the comment above.
For Linux, instructs CMake to use the FFmpeg submodule in externals.
This is HEAVILY based on our usage of the late Unicorn. Minimal change
to MSVC as it uses the yuzu-emu/ext-windows-bin. MinGW now targets the
same ext-windows-bin libraries as MSVC for FFmpeg. Adds FFMPEG_LIBRARIES
to WIN32 and simplifies video_core/CMakeLists.txt a bit.
Given these are only used as function existence checks, we can simplify
some usages of declval, given they aren't particularly useful here.
Reduces a few template instantiations, which at most reduces compile
times a tiny bit.
An identifier containing a starting underscore followed by a capital
letter is reserved by the standard. It's trivial to avoid this by moving
the underscore to the end of the identifier.
While the likelihood of clashing here being minimal, we can turn a
"should not break" scenario into a definitive "will not break" one, so
why not?.