mirror of
https://github.com/yuzu-emu/yuzu-mainline.git
synced 2024-12-23 19:25:32 +00:00
Merge pull request #9367 from lat9nq/occam-ffmpeg
CMake: Fix FFmpeg find module
This commit is contained in:
commit
dcc663e1bf
|
@ -19,6 +19,7 @@ cmake .. \
|
||||||
-DENABLE_QT_TRANSLATION=ON \
|
-DENABLE_QT_TRANSLATION=ON \
|
||||||
-DUSE_DISCORD_PRESENCE=ON \
|
-DUSE_DISCORD_PRESENCE=ON \
|
||||||
-DYUZU_ENABLE_COMPATIBILITY_REPORTING=${ENABLE_COMPATIBILITY_REPORTING:-"OFF"} \
|
-DYUZU_ENABLE_COMPATIBILITY_REPORTING=${ENABLE_COMPATIBILITY_REPORTING:-"OFF"} \
|
||||||
|
-DYUZU_USE_BUNDLED_FFMPEG=ON \
|
||||||
-GNinja
|
-GNinja
|
||||||
|
|
||||||
ninja
|
ninja
|
||||||
|
|
|
@ -458,22 +458,7 @@ if (UNIX AND NOT APPLE)
|
||||||
endif()
|
endif()
|
||||||
if (NOT YUZU_USE_BUNDLED_FFMPEG)
|
if (NOT YUZU_USE_BUNDLED_FFMPEG)
|
||||||
# Use system installed FFmpeg
|
# Use system installed FFmpeg
|
||||||
find_package(FFmpeg 4.3 QUIET COMPONENTS ${FFmpeg_COMPONENTS})
|
find_package(FFmpeg 4.3 REQUIRED QUIET COMPONENTS ${FFmpeg_COMPONENTS})
|
||||||
|
|
||||||
if (FFmpeg_FOUND)
|
|
||||||
# Overwrite aggregate defines from FFmpeg module to avoid over-linking libraries.
|
|
||||||
# Prevents shipping too many libraries with the AppImage.
|
|
||||||
set(FFmpeg_LIBRARIES "")
|
|
||||||
set(FFmpeg_INCLUDE_DIR "")
|
|
||||||
|
|
||||||
foreach(COMPONENT ${FFmpeg_COMPONENTS})
|
|
||||||
set(FFmpeg_LIBRARIES ${FFmpeg_LIBRARIES} ${FFmpeg_LIBRARY_${COMPONENT}} CACHE PATH "Paths to FFmpeg libraries" FORCE)
|
|
||||||
set(FFmpeg_INCLUDE_DIR ${FFmpeg_INCLUDE_DIR} ${FFmpeg_INCLUDE_${COMPONENT}} CACHE PATH "Path to FFmpeg headers" FORCE)
|
|
||||||
endforeach()
|
|
||||||
else()
|
|
||||||
message(WARNING "FFmpeg not found or too old, falling back to externals")
|
|
||||||
set(YUZU_USE_BUNDLED_FFMPEG ON)
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Prefer the -pthread flag on Linux.
|
# Prefer the -pthread flag on Linux.
|
||||||
|
|
8
externals/find-modules/FindFFmpeg.cmake
vendored
8
externals/find-modules/FindFFmpeg.cmake
vendored
|
@ -185,3 +185,11 @@ foreach(c ${_FFmpeg_ALL_COMPONENTS})
|
||||||
endforeach()
|
endforeach()
|
||||||
unset(_FFmpeg_ALL_COMPONENTS)
|
unset(_FFmpeg_ALL_COMPONENTS)
|
||||||
unset(_FFmpeg_REQUIRED_VARS)
|
unset(_FFmpeg_REQUIRED_VARS)
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(FFmpeg
|
||||||
|
REQUIRED_VARS
|
||||||
|
FFmpeg_LIBRARIES
|
||||||
|
FFmpeg_INCLUDE_DIR
|
||||||
|
HANDLE_COMPONENTS
|
||||||
|
)
|
||||||
|
|
Loading…
Reference in a new issue