cmake: finish OpenAL removal

drop orphaned ENABLE_OPENAL option
Remove the last remnant of the OpenAL backend: the now-unused
option(ENABLE_OPENAL ...) in the root CMakeLists.txt. The sink
implementation, build wiring, CPMAddPackage fetch, vcpkg manifest
entry, settings enum variant, and sink registration were removed in
prior commits
This commit is contained in:
cheezwiz7899
2026-06-29 16:44:36 +10:00
committed by Ploo
parent 2b66efc4b4
commit 28864c801e
6 changed files with 944 additions and 335 deletions
-2
View File
@@ -75,8 +75,6 @@ option(ENABLE_UNITY_BUILD "Enables the unity build" OFF)
option(ENABLE_CUBEB "Enables the cubeb audio backend" ON)
option(ENABLE_OPENAL "Enables the OpenAL audio backend" ON)
option(USE_DISCORD_PRESENCE "Enables Discord Rich Presence" OFF)
option(CITRON_TESTS "Compile tests" "${BUILD_TESTING}")
-27
View File
@@ -147,33 +147,6 @@ if (NOT TARGET zstd::libzstd_static)
endif()
endif()
# ── OpenAL Soft ───────────────────────────────────────────────────────────────
if (NOT TARGET OpenAL::OpenAL)
CPMAddPackage(
NAME OpenAL
GITHUB_REPOSITORY kcat/openal-soft
GIT_TAG 1.24.3
OPTIONS
"ALSOFT_UTILS OFF"
"ALSOFT_EXAMPLES OFF"
"ALSOFT_TESTS OFF"
"ALSOFT_INSTALL OFF"
"ALSOFT_INSTALL_CONFIG OFF"
"LIBTYPE STATIC"
)
if (TARGET OpenAL AND NOT TARGET OpenAL::OpenAL)
add_library(OpenAL::OpenAL ALIAS OpenAL)
endif()
# Patch OpenAL's vendored fmt header to fix undeclared 'malloc' on some toolchains
if (OpenAL_ADDED AND EXISTS "${OpenAL_SOURCE_DIR}/fmt-11.1.1/include/fmt/format.h")
file(READ "${OpenAL_SOURCE_DIR}/fmt-11.1.1/include/fmt/format.h" _fmt_content)
if (NOT _fmt_content MATCHES "#include <stdlib.h>")
string(REPLACE "#include \"base.h\"" "#include \"base.h\"\n#include <stdlib.h>" _fmt_content "${_fmt_content}")
file(WRITE "${OpenAL_SOURCE_DIR}/fmt-11.1.1/include/fmt/format.h" "${_fmt_content}")
endif()
endif()
endif()
# ── OpenSSL ───────────────────────────────────────────────────────────────────
if (ENABLE_OPENSSL OR ENABLE_WEB_SERVICE)
include(${CMAKE_SOURCE_DIR}/CMakeModules/openssl_build.cmake)
File diff suppressed because it is too large Load Diff
-13
View File
@@ -17,9 +17,6 @@
#ifdef HAVE_SDL2
#include "audio_core/sink/sdl2_sink.h"
#endif
#ifdef HAVE_OPENAL
#include "audio_core/sink/openal_sink.h"
#endif
#include "audio_core/sink/null_sink.h"
#include "common/logging.h"
#include "common/settings_enums.h"
@@ -72,16 +69,6 @@ constexpr SinkDetails sink_details[] = {
&ListSDLSinkDevices,
&IsSDLSuitable,
},
#endif
#ifdef HAVE_OPENAL
SinkDetails{
Settings::AudioEngine::OpenAL,
[](std::string_view device_id) -> std::unique_ptr<Sink> {
return std::make_unique<OpenALSink>(device_id);
},
&ListOpenALSinkDevices,
&IsOpenALSuitable,
},
#endif
SinkDetails{
Settings::AudioEngine::Null,
+2 -3
View File
@@ -83,7 +83,6 @@ enum class AudioEngine : u32 {
Auto,
Cubeb,
Sdl2,
OpenAL,
Null,
Oboe,
};
@@ -92,8 +91,8 @@ template <>
inline std::vector<std::pair<std::string, AudioEngine>>
EnumMetadata<AudioEngine>::Canonicalizations() {
return {
{"auto", AudioEngine::Auto}, {"cubeb", AudioEngine::Cubeb}, {"sdl2", AudioEngine::Sdl2},
{"openal", AudioEngine::OpenAL}, {"null", AudioEngine::Null}, {"oboe", AudioEngine::Oboe},
{"auto", AudioEngine::Auto}, {"cubeb", AudioEngine::Cubeb}, {"sdl2", AudioEngine::Sdl2},
{"null", AudioEngine::Null}, {"oboe", AudioEngine::Oboe},
};
}
-6
View File
@@ -34,7 +34,6 @@
"fmt",
"lz4",
"nlohmann-json",
"openal-soft",
{
"name": "openssl",
"platform": "!linux & !osx"
@@ -78,11 +77,6 @@
{
"name": "fmt",
"version": "12.1.0"
},
{
"name": "openal-soft",
"version": "1.24.3",
"port-version": 1
}
]
}