Kill Support for mixer sound
SDL3 doesn't have a public mixer yet anyway so its probably fine :)
This commit is contained in:
parent
277131a5a3
commit
177343594e
4 changed files with 10 additions and 1691 deletions
|
|
@ -75,7 +75,6 @@ option(SRB2_CONFIG_ENABLE_DISCORDRPC "Enable Discord RPC features" ON)
|
|||
option(SRB2_CONFIG_STATIC_STDLIB "Link static version of standard library. All dependencies must also be static" ON)
|
||||
option(SRB2_CONFIG_HWRENDER "Enable hardware render (OpenGL) support" ON)
|
||||
option(SRB2_CONFIG_USE_GME "Enable GME playback support" ON)
|
||||
option(SRB2_CONFIG_USE_OPENAL "Enable OpenAL audio backend support" ON)
|
||||
option(SRB2_CONFIG_STATIC_OPENGL "Enable static linking GL (do not do this)" OFF)
|
||||
option(SRB2_CONFIG_ERRORMODE "Compile C code with warnings treated as errors." OFF)
|
||||
option(SRB2_CONFIG_DEBUGMODE "Compile with PARANOIA, ZDEBUG, RANGECHECK and PACKETDROP defined." OFF)
|
||||
|
|
@ -140,9 +139,6 @@ if("${SRB2_CONFIG_SYSTEM_LIBRARIES}")
|
|||
find_package(ZLIB REQUIRED)
|
||||
find_package(PNG REQUIRED)
|
||||
find_package(SDL2 REQUIRED)
|
||||
if (NOT "${SRB2_CONFIG_USE_OPENAL}")
|
||||
find_package(SDL2_mixer REQUIRED)
|
||||
endif()
|
||||
find_package(CURL REQUIRED)
|
||||
find_package(OPENMPT REQUIRED)
|
||||
if("${SRB2_CONFIG_USE_GME}")
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Declare SDL2 interface sources
|
||||
# Declare SDL3 interface sources
|
||||
|
||||
target_sources(BLANKART PRIVATE
|
||||
ogl_sdl.c
|
||||
|
|
@ -75,28 +75,15 @@ target_compile_definitions(BLANKART PRIVATE -DHAVE_SDL)
|
|||
|
||||
find_package(OpenAL CONFIG QUIET)
|
||||
find_package(OpenAL QUIET)
|
||||
if(${SRB2_CONFIG_USE_OPENAL})
|
||||
target_link_libraries(BLANKART PRIVATE sndfile)
|
||||
target_compile_definitions(BLANKART PRIVATE -DHAVE_OPENAL)
|
||||
target_link_libraries(BLANKART PRIVATE OpenAL::OpenAL)
|
||||
target_sources(BLANKART PRIVATE al_sound.c)
|
||||
if(NOT "${SRB2_CONFIG_SYSTEM_LIBRARIES}" AND NOT "${SRB2_CONFIG_SHARED_INTERNAL_LIBRARIES}")
|
||||
target_link_libraries(BLANKART PRIVATE SDL2::SDL2-static)
|
||||
else()
|
||||
target_link_libraries(BLANKART PRIVATE SDL2::SDL2)
|
||||
endif()
|
||||
|
||||
target_link_libraries(BLANKART PRIVATE sndfile)
|
||||
target_compile_definitions(BLANKART PRIVATE -DHAVE_OPENAL)
|
||||
target_link_libraries(BLANKART PRIVATE OpenAL::OpenAL)
|
||||
target_sources(BLANKART PRIVATE al_sound.c)
|
||||
if(NOT "${SRB2_CONFIG_SYSTEM_LIBRARIES}" AND NOT "${SRB2_CONFIG_SHARED_INTERNAL_LIBRARIES}")
|
||||
target_link_libraries(BLANKART PRIVATE SDL2::SDL2-static)
|
||||
else()
|
||||
if(NOT "${SRB2_CONFIG_SYSTEM_LIBRARIES}" AND NOT "${SRB2_CONFIG_SHARED_INTERNAL_LIBRARIES}")
|
||||
target_link_libraries(BLANKART PRIVATE SDL2::SDL2-static SDL2_mixer::SDL2_mixer-static)
|
||||
else()
|
||||
target_link_libraries(BLANKART PRIVATE SDL2::SDL2 SDL2_mixer::SDL2_mixer)
|
||||
endif()
|
||||
|
||||
if(TARGET SDL2_mixer_ext::SDL2_mixer_ext OR TARGET SDL2_mixer_ext::SDL2_mixer_ext_Static OR TARGET SDL2_mixer::SDL2_mixer OR TARGET SDL2_mixer::SDL2_mixer-static)
|
||||
target_sources(BLANKART PRIVATE mixer_sound.c)
|
||||
endif()
|
||||
|
||||
target_compile_definitions(BLANKART PRIVATE -DHAVE_MIXER -DSOUND=SOUND_MIXER)
|
||||
target_link_libraries(BLANKART PRIVATE SDL2::SDL2)
|
||||
endif()
|
||||
|
||||
if(TARGET SDL2::SDL2)
|
||||
|
|
@ -113,16 +100,8 @@ endif()
|
|||
|
||||
if(TARGET OpenAL::OpenAL)
|
||||
message(STATUS "OpenAL Found")
|
||||
elseif(TARGET SDL2_mixer_ext::SDL2_mixer_ext OR TARGET SDL2_mixer_ext::SDL2_mixer_ext_Static)
|
||||
message(STATUS "SDL2_mixer_ext Found")
|
||||
elseif(TARGET SDL2_mixer::SDL2_mixer OR TARGET SDL2_mixer::SDL2_mixer-static)
|
||||
message(STATUS "SDL2_mixer found")
|
||||
else()
|
||||
if(${SRB2_CONFIG_USE_OPENAL})
|
||||
message(FATAL_ERROR "no OpenAL Found")
|
||||
else()
|
||||
message(FATAL_ERROR "no SDL2_mixer_ext or SDL2_mixer Found")
|
||||
endif()
|
||||
message(FATAL_ERROR "no OpenAL Found")
|
||||
endif()
|
||||
|
||||
#### Installation ####
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
7
thirdparty/CMakeLists.txt
vendored
7
thirdparty/CMakeLists.txt
vendored
|
|
@ -11,22 +11,15 @@ endmacro()
|
|||
|
||||
if(NOT "${SRB2_CONFIG_SYSTEM_LIBRARIES}")
|
||||
include("cpm-sdl2.cmake")
|
||||
|
||||
if (NOT "${SRB2_CONFIG_USE_OPENAL}")
|
||||
include("cpm-sdl2_mixer.cmake")
|
||||
endif()
|
||||
include("cpm-zlib-ng.cmake")
|
||||
include("cpm-png.cmake")
|
||||
include("cpm-curl.cmake")
|
||||
include("cpm-openmpt.cmake")
|
||||
include("cpm-libgme.cmake")
|
||||
if ("${SRB2_CONFIG_USE_OPENAL}")
|
||||
include("cpm-openal-soft.cmake")
|
||||
include("cpm-libsndfile.cmake")
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
if(SRB2_CONFIG_ENABLE_DISCORDRPC)
|
||||
add_subdirectory(discord-rpc)
|
||||
endif()
|
||||
|
|
|
|||
Loading…
Reference in a new issue