[cmake] refactor: Use CPM over submodules #143

Merged
crueter merged 42 commits from refactor/cpm into master 2025-08-04 04:50:17 +02:00
7 changed files with 17 additions and 16 deletions
Showing only changes of commit c3c04b17c9 - Show all commits

3
.gitmodules vendored
View file

@ -7,9 +7,6 @@
[submodule "xbyak"] [submodule "xbyak"]
path = externals/xbyak path = externals/xbyak
url = https://github.com/Lizzie841/xbyak.git url = https://github.com/Lizzie841/xbyak.git
[submodule "opus"]
path = externals/opus
url = https://github.com/xiph/opus.git
[submodule "cpp-httplib"] [submodule "cpp-httplib"]
path = externals/cpp-httplib path = externals/cpp-httplib
url = https://github.com/yhirose/cpp-httplib.git url = https://github.com/yhirose/cpp-httplib.git

View file

@ -147,13 +147,18 @@ if (ENABLE_WEB_SERVICE AND NOT TARGET cpp-jwt::cpp-jwt)
endif() endif()
# Opus # Opus
if (NOT TARGET Opus::opus) set(CPM_USE_LOCAL_PACKAGES ON)
set(OPUS_BUILD_TESTING OFF) CPMAddPackage(
set(OPUS_BUILD_PROGRAMS OFF) NAME Opus
set(OPUS_INSTALL_PKG_CONFIG_MODULE OFF) VERSION 1.3
set(OPUS_INSTALL_CMAKE_CONFIG_MODULE OFF) URL "https://github.com/xiph/opus/archive/5ded705cf4.zip"
add_subdirectory(opus) FIND_PACKAGE_ARGUMENTS "MODULE"
endif() OPTIONS
"OPUS_BUILD_TESTING OFF"
"OPUS_BUILD_PROGRAMS OFF"
"OPUS_INSTALL_PKG_CONFIG_MODULE OFF"
"OPUS_INSTALL_CMAKE_CONFIG_MODULE OFF"
)
# FFMpeg # FFMpeg
if (YUZU_USE_BUNDLED_FFMPEG) if (YUZU_USE_BUNDLED_FFMPEG)

1
externals/opus vendored

@ -1 +0,0 @@
Subproject commit 5ded705cf4ffa13702c78eebecea0fdb2f4ef0de

View file

@ -226,8 +226,8 @@ else()
) )
endif() endif()
target_link_libraries(audio_core PUBLIC common core Opus) target_link_libraries(audio_core PUBLIC common core opus)
target_include_directories(audio_core PRIVATE ${Opus_INCLUDE_DIR})
if (ARCHITECTURE_x86_64 OR ARCHITECTURE_arm64) if (ARCHITECTURE_x86_64 OR ARCHITECTURE_arm64)
target_link_libraries(audio_core PRIVATE dynarmic::dynarmic) target_link_libraries(audio_core PRIVATE dynarmic::dynarmic)
endif() endif()

View file

@ -3,7 +3,7 @@
#pragma once #pragma once
#include <opus.h> #include <opus/opus.h>
#include "common/common_types.h" #include "common/common_types.h"

View file

@ -3,7 +3,7 @@
#pragma once #pragma once
#include <opus_multistream.h> #include <opus/opus_multistream.h>
#include "common/common_types.h" #include "common/common_types.h"

View file

@ -4,7 +4,7 @@
#pragma once #pragma once
#include <mutex> #include <mutex>
#include <opus.h> #include <opus/opus.h>
#include "audio_core/adsp/apps/opus/opus_decoder.h" #include "audio_core/adsp/apps/opus/opus_decoder.h"
#include "audio_core/adsp/apps/opus/shared_memory.h" #include "audio_core/adsp/apps/opus/shared_memory.h"