diff options
| author | Mat M <mathew1800@gmail.com> | 2017-05-27 17:36:55 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-05-27 17:36:55 -0400 |
| commit | 7b70fce79bf548dca345ce98cee7c7e45b2bf52d (patch) | |
| tree | b9cb16563cfda100bfaa0e1636f4bfef9ded36af /Source/Core/VideoCommon | |
| parent | 6f197f3a3cdec2343556e31b79d5b7e254eb11c9 (diff) | |
| parent | 3ca03373ae993e69088a33458e16afe1ee946eee (diff) | |
Merge pull request #5476 from ligfx/ffmpegbuildcleanup
CMake/MSVC: cleanups around FFMpeg
Diffstat (limited to 'Source/Core/VideoCommon')
| -rw-r--r-- | Source/Core/VideoCommon/AVIDump.h | 2 | ||||
| -rw-r--r-- | Source/Core/VideoCommon/CMakeLists.txt | 14 | ||||
| -rw-r--r-- | Source/Core/VideoCommon/RenderBase.cpp | 8 |
3 files changed, 13 insertions, 11 deletions
diff --git a/Source/Core/VideoCommon/AVIDump.h b/Source/Core/VideoCommon/AVIDump.h index fcc3ddb2ce..065a5d63d0 100644 --- a/Source/Core/VideoCommon/AVIDump.h +++ b/Source/Core/VideoCommon/AVIDump.h @@ -27,7 +27,7 @@ public: static void Stop(); static void DoState(); -#if defined(HAVE_LIBAV) || defined(_WIN32) +#if defined(HAVE_FFMPEG) static Frame FetchState(u64 ticks); #else static Frame FetchState(u64 ticks) { return {}; } diff --git a/Source/Core/VideoCommon/CMakeLists.txt b/Source/Core/VideoCommon/CMakeLists.txt index 7eef4f715d..a50cd2774a 100644 --- a/Source/Core/VideoCommon/CMakeLists.txt +++ b/Source/Core/VideoCommon/CMakeLists.txt @@ -62,12 +62,14 @@ else() set(SRCS ${SRCS} TextureDecoder_Generic.cpp) endif() -if(LIBAV_FOUND OR WIN32) - set(SRCS ${SRCS} AVIDump.cpp) -endif() - add_dolphin_library(videocommon "${SRCS}" "${LIBS}") -if(LIBAV_FOUND) - target_link_libraries(videocommon PRIVATE ${LIBS} ${LIBAV_LIBRARIES}) +if(FFmpeg_FOUND) + target_sources(videocommon PRIVATE AVIDump.cpp) + target_link_libraries(videocommon PRIVATE + FFmpeg::avcodec + FFmpeg::avformat + FFmpeg::avutil + FFmpeg::swscale + ) endif() diff --git a/Source/Core/VideoCommon/RenderBase.cpp b/Source/Core/VideoCommon/RenderBase.cpp index ff390a8c7d..42f07ef403 100644 --- a/Source/Core/VideoCommon/RenderBase.cpp +++ b/Source/Core/VideoCommon/RenderBase.cpp @@ -774,7 +774,7 @@ bool Renderer::IsFrameDumping() if (m_screenshot_request.IsSet()) return true; -#if defined(HAVE_LIBAV) || defined(_WIN32) +#if defined(HAVE_FFMPEG) if (SConfig::GetInstance().m_DumpFrames) return true; #endif @@ -828,7 +828,7 @@ void Renderer::RunFrameDumps() bool frame_dump_started = false; // If Dolphin was compiled without libav, we only support dumping to images. -#if !defined(HAVE_LIBAV) && !defined(_WIN32) +#if !defined(HAVE_FFMPEG) if (dump_to_avi) { WARN_LOG(VIDEO, "AVI frame dump requested, but Dolphin was compiled without libav. " @@ -900,7 +900,7 @@ void Renderer::RunFrameDumps() } } -#if defined(HAVE_LIBAV) || defined(_WIN32) +#if defined(HAVE_FFMPEG) bool Renderer::StartFrameDumpToAVI(const FrameDumpConfig& config) { @@ -932,7 +932,7 @@ void Renderer::StopFrameDumpToAVI() { } -#endif // defined(HAVE_LIBAV) || defined(WIN32) +#endif // defined(HAVE_FFMPEG) std::string Renderer::GetFrameDumpNextImageFileName() const { |
