summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt2
-rw-r--r--externals/CMakeLists.txt6
-rw-r--r--externals/find-modules/Findopus.cmake2
-rw-r--r--externals/opus/CMakeLists.txt2
-rw-r--r--src/core/CMakeLists.txt2
5 files changed, 11 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ac7c3ce90..6ea6c650e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -172,6 +172,8 @@ macro(yuzu_find_packages)
172 "nlohmann_json 3.8 nlohmann_json/3.8.0" 172 "nlohmann_json 3.8 nlohmann_json/3.8.0"
173 "ZLIB 1.2 zlib/1.2.11" 173 "ZLIB 1.2 zlib/1.2.11"
174 "zstd 1.4 zstd/1.4.8" 174 "zstd 1.4 zstd/1.4.8"
175 # can't use opus until AVX check is fixed: https://github.com/yuzu-emu/yuzu/pull/4068
176 #"opus 1.3 opus/1.3.1"
175 ) 177 )
176 178
177 foreach(PACKAGE ${REQUIRED_LIBS}) 179 foreach(PACKAGE ${REQUIRED_LIBS})
diff --git a/externals/CMakeLists.txt b/externals/CMakeLists.txt
index 851c282b4..891a47c3c 100644
--- a/externals/CMakeLists.txt
+++ b/externals/CMakeLists.txt
@@ -97,4 +97,8 @@ if (ENABLE_WEB_SERVICE)
97endif() 97endif()
98 98
99# Opus 99# Opus
100add_subdirectory(opus) 100find_package(opus 1.3)
101if (NOT opus_FOUND)
102 message(STATUS "opus 1.3 or newer not found, falling back to externals")
103 add_subdirectory(opus EXCLUDE_FROM_ALL)
104endif()
diff --git a/externals/find-modules/Findopus.cmake b/externals/find-modules/Findopus.cmake
index de84bd995..2bce56122 100644
--- a/externals/find-modules/Findopus.cmake
+++ b/externals/find-modules/Findopus.cmake
@@ -28,7 +28,7 @@ if(opus_FOUND)
28endif() 28endif()
29 29
30if(opus_FOUND AND NOT TARGET Opus::Opus) 30if(opus_FOUND AND NOT TARGET Opus::Opus)
31 add_library(Opus::Opus UNKNOWN IMPORTED) 31 add_library(Opus::Opus UNKNOWN IMPORTED GLOBAL)
32 set_target_properties(Opus::Opus PROPERTIES 32 set_target_properties(Opus::Opus PROPERTIES
33 IMPORTED_LOCATION "${opus_LIBRARY}" 33 IMPORTED_LOCATION "${opus_LIBRARY}"
34 INTERFACE_COMPILE_OPTIONS "${PC_opus_CFLAGS_OTHER}" 34 INTERFACE_COMPILE_OPTIONS "${PC_opus_CFLAGS_OTHER}"
diff --git a/externals/opus/CMakeLists.txt b/externals/opus/CMakeLists.txt
index 94a86551f..16f5af9f2 100644
--- a/externals/opus/CMakeLists.txt
+++ b/externals/opus/CMakeLists.txt
@@ -252,3 +252,5 @@ PRIVATE
252 opus/silk/float 252 opus/silk/float
253 opus/src 253 opus/src
254) 254)
255
256add_library(Opus::Opus ALIAS opus)
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index 0c1f5b0c8..167ee13f3 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -673,7 +673,7 @@ endif()
673create_target_directory_groups(core) 673create_target_directory_groups(core)
674 674
675target_link_libraries(core PUBLIC common PRIVATE audio_core video_core) 675target_link_libraries(core PUBLIC common PRIVATE audio_core video_core)
676target_link_libraries(core PUBLIC Boost::boost PRIVATE fmt::fmt nlohmann_json::nlohmann_json mbedtls opus zip) 676target_link_libraries(core PUBLIC Boost::boost PRIVATE fmt::fmt nlohmann_json::nlohmann_json mbedtls Opus::Opus zip)
677 677
678if (YUZU_ENABLE_BOXCAT) 678if (YUZU_ENABLE_BOXCAT)
679 target_compile_definitions(core PRIVATE -DYUZU_ENABLE_BOXCAT) 679 target_compile_definitions(core PRIVATE -DYUZU_ENABLE_BOXCAT)