[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"]
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

View file

@ -147,13 +147,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)

1
externals/opus vendored

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

View file

@ -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()

View file

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

View file

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

View file

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