[cmake] sdl3 ci, fixup cpmfile defs, fix sdl headers
All checks were successful
eden-license / license-header (pull_request) Successful in 29s

Signed-off-by: crueter <crueter@eden-emu.dev>
This commit is contained in:
crueter 2025-10-07 18:41:28 -04:00
parent 6c0f4a3472
commit 558922b369
Signed by: crueter
GPG key ID: 425ACD2D4830EBC6
5 changed files with 17 additions and 11 deletions

View file

@ -384,9 +384,6 @@ if (PLATFORM_LINUX OR CXX_CLANG)
endif() endif()
endif() endif()
# Other presets, e.g. steamdeck
set(YUZU_SYSTEM_PROFILE "generic" CACHE STRING "CMake and Externals profile to use. One of: generic, steamdeck")
# Configure C++ standard # Configure C++ standard
# =========================== # ===========================
@ -578,8 +575,8 @@ if (ARCHITECTURE_arm64 OR DYNARMIC_TESTS)
find_package(oaknut) find_package(oaknut)
endif() endif()
if (ENABLE_SDL2) if (ENABLE_SDL3)
find_package(SDL2) find_package(SDL3)
endif() endif()
if (USE_DISCORD_PRESENCE) if (USE_DISCORD_PRESENCE)

View file

@ -134,6 +134,9 @@ if (ENABLE_SDL3)
endif() endif()
AddJsonPackage(sdl3) AddJsonPackage(sdl3)
# annoying
target_include_directories(SDL3_Headers INTERFACE ${SDL3_SOURCE_DIR}/include/SDL3)
elseif (YUZU_USE_BUNDLED_SDL3) elseif (YUZU_USE_BUNDLED_SDL3)
message(STATUS "Using bundled SDL3") message(STATUS "Using bundled SDL3")
AddJsonPackage(sdl3-ci) AddJsonPackage(sdl3-ci)

View file

@ -158,10 +158,12 @@
"ci": true, "ci": true,
"package": "SDL3", "package": "SDL3",
"name": "SDL3", "name": "SDL3",
"repo": "libsdl-org/SDL3", "repo": "crueter-ci/SDL3",
"version": "3.2.22", "version": "3.2.24",
"min_version": "3.2.12", "min_version": "3.2.12",
"cmake_filename": "sdl3" "disabled_platforms": [
"macos-universal"
]
}, },
"catch2": { "catch2": {
"package": "Catch2", "package": "Catch2",

View file

@ -254,6 +254,10 @@ if (ENABLE_SDL3)
) )
target_link_libraries(audio_core PRIVATE SDL3::SDL3) target_link_libraries(audio_core PRIVATE SDL3::SDL3)
if (TARGET SDL3::Headers)
target_link_libraries(audio_core PRIVATE SDL3::Headers)
endif()
target_compile_definitions(audio_core PRIVATE HAVE_SDL3) target_compile_definitions(audio_core PRIVATE HAVE_SDL3)
endif() endif()

View file

@ -60,8 +60,8 @@ public:
if (devices) { if (devices) {
for (int i = 0; i < count; ++i) { for (int i = 0; i < count; ++i) {
const char* name = SDL_GetAudioDeviceName(devices[i]); const char* devname = SDL_GetAudioDeviceName(devices[i]);
if (name && device_name == name) { if (devname && device_name == devname) {
device_id = devices[i]; device_id = devices[i];
break; break;
} }
@ -280,4 +280,4 @@ u32 GetSDLLatency() {
return TargetSampleCount * 2; return TargetSampleCount * 2;
} }
} // namespace AudioCore::Sink } // namespace AudioCore::Sink