diff --git a/.gitmodules b/.gitmodules index 8bf3723a91..b65d464496 100644 --- a/.gitmodules +++ b/.gitmodules @@ -7,9 +7,6 @@ [submodule "xbyak"] path = externals/xbyak url = https://github.com/Lizzie841/xbyak.git -[submodule "opus"] - path = externals/opus - url = https://github.com/xiph/opus.git [submodule "cpp-httplib"] path = externals/cpp-httplib url = https://github.com/yhirose/cpp-httplib.git diff --git a/externals/CMakeLists.txt b/externals/CMakeLists.txt index 9681e2bbbf..e988bb4205 100644 --- a/externals/CMakeLists.txt +++ b/externals/CMakeLists.txt @@ -139,13 +139,18 @@ if (ENABLE_WEB_SERVICE AND NOT TARGET cpp-jwt::cpp-jwt) endif() # Opus -if (NOT TARGET Opus::opus) - set(OPUS_BUILD_TESTING OFF) - set(OPUS_BUILD_PROGRAMS OFF) - set(OPUS_INSTALL_PKG_CONFIG_MODULE OFF) - set(OPUS_INSTALL_CMAKE_CONFIG_MODULE OFF) - add_subdirectory(opus) -endif() +set(CPM_USE_LOCAL_PACKAGES ON) +CPMAddPackage( + NAME Opus + VERSION 1.3 + URL "https://github.com/xiph/opus/archive/5ded705cf4.zip" + FIND_PACKAGE_ARGUMENTS "MODULE" + OPTIONS + "OPUS_BUILD_TESTING OFF" + "OPUS_BUILD_PROGRAMS OFF" + "OPUS_INSTALL_PKG_CONFIG_MODULE OFF" + "OPUS_INSTALL_CMAKE_CONFIG_MODULE OFF" +) # FFMpeg if (YUZU_USE_BUNDLED_FFMPEG) diff --git a/externals/opus b/externals/opus deleted file mode 160000 index 5ded705cf4..0000000000 --- a/externals/opus +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 5ded705cf4ffa13702c78eebecea0fdb2f4ef0de diff --git a/src/audio_core/CMakeLists.txt b/src/audio_core/CMakeLists.txt index bb62608da8..cf4bcab059 100644 --- a/src/audio_core/CMakeLists.txt +++ b/src/audio_core/CMakeLists.txt @@ -226,8 +226,8 @@ else() ) endif() -target_link_libraries(audio_core PUBLIC common core Opus) -target_include_directories(audio_core PRIVATE ${Opus_INCLUDE_DIR}) +target_link_libraries(audio_core PUBLIC common core opus) + if (ARCHITECTURE_x86_64 OR ARCHITECTURE_arm64) target_link_libraries(audio_core PRIVATE dynarmic::dynarmic) endif() diff --git a/src/audio_core/adsp/apps/opus/opus_decode_object.h b/src/audio_core/adsp/apps/opus/opus_decode_object.h index 6425f987c6..8b821a0f75 100644 --- a/src/audio_core/adsp/apps/opus/opus_decode_object.h +++ b/src/audio_core/adsp/apps/opus/opus_decode_object.h @@ -3,7 +3,7 @@ #pragma once -#include +#include #include "common/common_types.h" diff --git a/src/audio_core/adsp/apps/opus/opus_multistream_decode_object.h b/src/audio_core/adsp/apps/opus/opus_multistream_decode_object.h index 93558ded5d..f66bedbde3 100644 --- a/src/audio_core/adsp/apps/opus/opus_multistream_decode_object.h +++ b/src/audio_core/adsp/apps/opus/opus_multistream_decode_object.h @@ -3,7 +3,7 @@ #pragma once -#include +#include #include "common/common_types.h" diff --git a/src/audio_core/opus/hardware_opus.h b/src/audio_core/opus/hardware_opus.h index caa7468401..eb5cdf3449 100644 --- a/src/audio_core/opus/hardware_opus.h +++ b/src/audio_core/opus/hardware_opus.h @@ -4,7 +4,7 @@ #pragma once #include -#include +#include #include "audio_core/adsp/apps/opus/opus_decoder.h" #include "audio_core/adsp/apps/opus/shared_memory.h"