From 977ff23f6615b8eff2a6e67422fb82b641a2ae62 Mon Sep 17 00:00:00 2001 From: pineappleEA Date: Sat, 10 Apr 2021 12:19:59 +0200 Subject: [PATCH] early-access version 1580 --- CMakeLists.txt | 2 ++ README.md | 2 +- externals/CMakeLists.txt | 6 +++++- externals/find-modules/Findopus.cmake | 2 +- externals/opus/CMakeLists.txt | 2 ++ src/core/CMakeLists.txt | 2 +- 6 files changed, 12 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ac7c3ce90..6ea6c650e 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -172,6 +172,8 @@ macro(yuzu_find_packages) "nlohmann_json 3.8 nlohmann_json/3.8.0" "ZLIB 1.2 zlib/1.2.11" "zstd 1.4 zstd/1.4.8" + # can't use opus until AVX check is fixed: https://github.com/yuzu-emu/yuzu/pull/4068 + #"opus 1.3 opus/1.3.1" ) foreach(PACKAGE ${REQUIRED_LIBS}) diff --git a/README.md b/README.md index 8a2a5b113..f989702d6 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ yuzu emulator early access ============= -This is the source code for early-access 1579. +This is the source code for early-access 1580. ## Legal Notice diff --git a/externals/CMakeLists.txt b/externals/CMakeLists.txt index 851c282b4..891a47c3c 100755 --- a/externals/CMakeLists.txt +++ b/externals/CMakeLists.txt @@ -97,4 +97,8 @@ if (ENABLE_WEB_SERVICE) endif() # Opus -add_subdirectory(opus) +find_package(opus 1.3) +if (NOT opus_FOUND) + message(STATUS "opus 1.3 or newer not found, falling back to externals") + add_subdirectory(opus EXCLUDE_FROM_ALL) +endif() diff --git a/externals/find-modules/Findopus.cmake b/externals/find-modules/Findopus.cmake index de84bd995..2bce56122 100755 --- a/externals/find-modules/Findopus.cmake +++ b/externals/find-modules/Findopus.cmake @@ -28,7 +28,7 @@ if(opus_FOUND) endif() if(opus_FOUND AND NOT TARGET Opus::Opus) - add_library(Opus::Opus UNKNOWN IMPORTED) + add_library(Opus::Opus UNKNOWN IMPORTED GLOBAL) set_target_properties(Opus::Opus PROPERTIES IMPORTED_LOCATION "${opus_LIBRARY}" INTERFACE_COMPILE_OPTIONS "${PC_opus_CFLAGS_OTHER}" diff --git a/externals/opus/CMakeLists.txt b/externals/opus/CMakeLists.txt index 94a86551f..16f5af9f2 100755 --- a/externals/opus/CMakeLists.txt +++ b/externals/opus/CMakeLists.txt @@ -252,3 +252,5 @@ PRIVATE opus/silk/float opus/src ) + +add_library(Opus::Opus ALIAS opus) diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 5aa833d46..7d9eba928 100755 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -674,7 +674,7 @@ endif() create_target_directory_groups(core) target_link_libraries(core PUBLIC common PRIVATE audio_core video_core) -target_link_libraries(core PUBLIC Boost::boost PRIVATE fmt::fmt nlohmann_json::nlohmann_json mbedtls opus zip) +target_link_libraries(core PUBLIC Boost::boost PRIVATE fmt::fmt nlohmann_json::nlohmann_json mbedtls Opus::Opus zip) if (YUZU_ENABLE_BOXCAT) target_compile_definitions(core PRIVATE -DYUZU_ENABLE_BOXCAT)