summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--CMakeLists.txt13
1 files changed, 6 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2c1c3d560..7afa972f5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -19,7 +19,7 @@ CMAKE_DEPENDENT_OPTION(YUZU_USE_BUNDLED_QT "Download bundled Qt binaries" ON "EN
19 19
20option(ENABLE_WEB_SERVICE "Enable web services (telemetry, etc.)" ON) 20option(ENABLE_WEB_SERVICE "Enable web services (telemetry, etc.)" ON)
21 21
22CMAKE_DEPENDENT_OPTION(YUZU_USE_BUNDLED_FFMPEG "Download/Build bundled yuzu" ON "WIN32" OFF) 22CMAKE_DEPENDENT_OPTION(YUZU_USE_BUNDLED_FFMPEG "Download/Build bundled FFmpeg" ON "WIN32" OFF)
23 23
24option(YUZU_USE_QT_WEB_ENGINE "Use QtWebEngine for web applet implementation" OFF) 24option(YUZU_USE_QT_WEB_ENGINE "Use QtWebEngine for web applet implementation" OFF)
25 25
@@ -274,7 +274,7 @@ if (ENABLE_SDL2)
274 target_link_libraries(SDL2 INTERFACE "${SDL2_LIBRARY}") 274 target_link_libraries(SDL2 INTERFACE "${SDL2_LIBRARY}")
275 target_include_directories(SDL2 INTERFACE "${SDL2_INCLUDE_DIR}") 275 target_include_directories(SDL2 INTERFACE "${SDL2_INCLUDE_DIR}")
276 else() 276 else()
277 find_package(SDL2 2.0.14) 277 find_package(SDL2 2.0.14 QUIET)
278 278
279 if (SDL2_FOUND) 279 if (SDL2_FOUND)
280 # Some installations don't set SDL2_LIBRARIES 280 # Some installations don't set SDL2_LIBRARIES
@@ -394,7 +394,7 @@ set(FFmpeg_COMPONENTS
394 394
395if (NOT YUZU_USE_BUNDLED_FFMPEG) 395if (NOT YUZU_USE_BUNDLED_FFMPEG)
396 # Use system installed FFmpeg 396 # Use system installed FFmpeg
397 find_package(FFmpeg REQUIRED COMPONENTS ${FFmpeg_COMPONENTS}) 397 find_package(FFmpeg QUIET COMPONENTS ${FFmpeg_COMPONENTS})
398 398
399 if (FFmpeg_FOUND) 399 if (FFmpeg_FOUND)
400 # Overwrite aggregate defines from FFmpeg module to avoid over-linking libraries. 400 # Overwrite aggregate defines from FFmpeg module to avoid over-linking libraries.
@@ -433,6 +433,7 @@ if (YUZU_USE_BUNDLED_FFMPEG)
433 set(FFmpeg_FOUND YES) 433 set(FFmpeg_FOUND YES)
434 endif() 434 endif()
435 435
436 unset(FFmpeg_LIBRARIES CACHE)
436 foreach(COMPONENT ${FFmpeg_COMPONENTS}) 437 foreach(COMPONENT ${FFmpeg_COMPONENTS})
437 set(FFmpeg_${COMPONENT}_PREFIX "${FFmpeg_BUILD_DIR}/lib${COMPONENT}") 438 set(FFmpeg_${COMPONENT}_PREFIX "${FFmpeg_BUILD_DIR}/lib${COMPONENT}")
438 set(FFmpeg_${COMPONENT}_LIB_NAME "lib${COMPONENT}.a") 439 set(FFmpeg_${COMPONENT}_LIB_NAME "lib${COMPONENT}.a")
@@ -445,7 +446,7 @@ if (YUZU_USE_BUNDLED_FFMPEG)
445 endforeach() 446 endforeach()
446 447
447 set(FFmpeg_INCLUDE_DIR 448 set(FFmpeg_INCLUDE_DIR
448 ${FFmpeg_PREFIX} 449 "${FFmpeg_PREFIX};${FFmpeg_BUILD_DIR}"
449 CACHE PATH "Path to FFmpeg headers" FORCE) 450 CACHE PATH "Path to FFmpeg headers" FORCE)
450 451
451 # `configure` parameters builds only exactly what yuzu needs from FFmpeg 452 # `configure` parameters builds only exactly what yuzu needs from FFmpeg
@@ -492,13 +493,11 @@ if (YUZU_USE_BUNDLED_FFMPEG)
492 493
493 # ALL makes this custom target build every time 494 # ALL makes this custom target build every time
494 # but it won't actually build if the DEPENDS parameter is up to date 495 # but it won't actually build if the DEPENDS parameter is up to date
495 add_custom_target(ffmpeg-build ALL DEPENDS ${FFmpeg_LIBRARIES})
496 add_custom_target(ffmpeg-configure ALL DEPENDS ${FFmpeg_MAKEFILE}) 496 add_custom_target(ffmpeg-configure ALL DEPENDS ${FFmpeg_MAKEFILE})
497 add_custom_target(ffmpeg-build ALL DEPENDS ${FFmpeg_LIBRARIES} ffmpeg-configure)
497 498
498 if (FFmpeg_FOUND) 499 if (FFmpeg_FOUND)
499 message(STATUS "Found FFmpeg version ${FFmpeg_VERSION}") 500 message(STATUS "Found FFmpeg version ${FFmpeg_VERSION}")
500
501 add_dependencies(ffmpeg-build ffmpeg-configure)
502 else() 501 else()
503 message(FATAL_ERROR "FFmpeg not found") 502 message(FATAL_ERROR "FFmpeg not found")
504 endif() 503 endif()