summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorliushuyu <liushuyu011@gmail.com>2021-12-15 08:53:22 +0100
committerliushuyu <liushuyu011@gmail.com>2021-12-16 05:17:33 +0100
commit476637d1435f031017abb06a42902b925dc08151 (patch)
tree98175e2b9542703be8f652613b1ad72bfa450b11
parentexternals: fix a regression when using MSVC (diff)
downloadyuzu-476637d1435f031017abb06a42902b925dc08151.tar
yuzu-476637d1435f031017abb06a42902b925dc08151.tar.gz
yuzu-476637d1435f031017abb06a42902b925dc08151.tar.bz2
yuzu-476637d1435f031017abb06a42902b925dc08151.tar.lz
yuzu-476637d1435f031017abb06a42902b925dc08151.tar.xz
yuzu-476637d1435f031017abb06a42902b925dc08151.tar.zst
yuzu-476637d1435f031017abb06a42902b925dc08151.zip
-rw-r--r--externals/CMakeLists.txt3
-rw-r--r--externals/ffmpeg/CMakeLists.txt15
2 files changed, 13 insertions, 5 deletions
diff --git a/externals/CMakeLists.txt b/externals/CMakeLists.txt
index 6457387b4..edfa3a2be 100644
--- a/externals/CMakeLists.txt
+++ b/externals/CMakeLists.txt
@@ -126,4 +126,7 @@ endif()
if (YUZU_USE_BUNDLED_FFMPEG)
add_subdirectory(ffmpeg)
set(FFmpeg_PATH "${FFmpeg_PATH}" PARENT_SCOPE)
+ set(FFmpeg_LDFLAGS "${FFmpeg_LDFLAGS}" PARENT_SCOPE)
+ set(FFmpeg_LIBRARIES "${FFmpeg_LIBRARIES}" PARENT_SCOPE)
+ set(FFmpeg_INCLUDE_DIR "${FFmpeg_INCLUDE_DIR}" PARENT_SCOPE)
endif()
diff --git a/externals/ffmpeg/CMakeLists.txt b/externals/ffmpeg/CMakeLists.txt
index 93bd06fd7..c57b54f77 100644
--- a/externals/ffmpeg/CMakeLists.txt
+++ b/externals/ffmpeg/CMakeLists.txt
@@ -192,7 +192,7 @@ if (NOT WIN32)
else(WIN32)
# Use yuzu FFmpeg binaries
set(FFmpeg_EXT_NAME "ffmpeg-4.4")
- set(FFmpeg_PATH "${CMAKE_BINARY_DIR}/externals/${FFmpeg_EXT_NAME}" PARENT_SCOPE)
+ set(FFmpeg_PATH "${CMAKE_BINARY_DIR}/externals/${FFmpeg_EXT_NAME}")
download_bundled_external("ffmpeg/" ${FFmpeg_EXT_NAME} "")
set(FFmpeg_FOUND YES)
set(FFmpeg_INCLUDE_DIR "${FFmpeg_PATH}/include" CACHE PATH "Path to FFmpeg headers" FORCE)
@@ -200,10 +200,15 @@ else(WIN32)
set(FFmpeg_LDFLAGS "" CACHE STRING "FFmpeg linker flags" FORCE)
set(FFmpeg_DLL_DIR "${FFmpeg_PATH}/bin" CACHE PATH "Path to FFmpeg dll's" FORCE)
set(FFmpeg_LIBRARIES
- ${FFmpeg_LIBRARY_DIR}/swscale.lib
- ${FFmpeg_LIBRARY_DIR}/avcodec.lib
- ${FFmpeg_LIBRARY_DIR}/avutil.lib
- CACHE PATH "Paths to FFmpeg libraries" FORCE)
+ ${FFmpeg_LIBRARY_DIR}/swscale.lib
+ ${FFmpeg_LIBRARY_DIR}/avcodec.lib
+ ${FFmpeg_LIBRARY_DIR}/avutil.lib
+ CACHE PATH "Paths to FFmpeg libraries" FORCE)
+ # exported variables
+ set(FFmpeg_PATH "${FFmpeg_PATH}" PARENT_SCOPE)
+ set(FFmpeg_LDFLAGS "${FFmpeg_LDFLAGS}" PARENT_SCOPE)
+ set(FFmpeg_LIBRARIES "${FFmpeg_LIBRARIES}" PARENT_SCOPE)
+ set(FFmpeg_INCLUDE_DIR "${FFmpeg_INCLUDE_DIR}" PARENT_SCOPE)
endif(WIN32)
unset(FFmpeg_COMPONENTS)