Skip to content

Only build ffmpeg when FFmpeg support is enabled #3175

Description

@bobtista

The vcpkg manifest lists ffmpeg as an unconditional dependency, but RTS_BUILD_OPTION_FFMPEG defaults to OFF and no preset or CI job turns it on. The only consumer is guarded at Core/GameEngineDevice/CMakeLists.txt:236, so vcpkg builds ffmpeg from source on every cold build and no target links it.

On a cold win32-vcpkg build it accounts for 19 minutes of roughly 26. Every other package combined is under 30 seconds: zlib 4.3s, stb 385ms, pkgconf 15s, and the vcpkg-* helpers in milliseconds.

Reproduction:

  1. Configure any win32-vcpkg preset against an empty binary cache
  2. Look for Elapsed time to handle ffmpeg:x86-windows in the vcpkg install output
  3. Confirm no target links FFmpeg, since RTS_BUILD_OPTION_FFMPEG is OFF

Note that RTS_BUILD_OPTION_FFMPEG is not defined until cmake/config.cmake is included at CMakeLists.txt:65, which is after project() at line 34 where the vcpkg toolchain resolves the manifest.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BuildAnything related to building, compiling

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions