mirror of
https://github.com/shadps4-emu/ext-SDL.git
synced 2024-11-24 18:50:05 +00:00
cmake/sdlchecks.cmake: make it diff smaller against SDL2
This commit is contained in:
parent
378b1c286a
commit
bb8adf74e0
@ -165,35 +165,6 @@ macro(CheckPulseAudio)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
# Requires:
|
||||
# - PkgCheckModules
|
||||
# Optional:
|
||||
# - SDL_SNDIO_SHARED opt
|
||||
# - HAVE_SDL_LOADSO opt
|
||||
macro(CheckSNDIO)
|
||||
if(SDL_SNDIO)
|
||||
pkg_check_modules(PKG_SNDIO sndio)
|
||||
if(PKG_SNDIO_FOUND)
|
||||
set(HAVE_SNDIO TRUE)
|
||||
file(GLOB SNDIO_SOURCES ${SDL3_SOURCE_DIR}/src/audio/sndio/*.c)
|
||||
list(APPEND SOURCE_FILES ${SNDIO_SOURCES})
|
||||
set(SDL_AUDIO_DRIVER_SNDIO 1)
|
||||
list(APPEND EXTRA_CFLAGS ${PKG_SNDIO_CFLAGS})
|
||||
if(SDL_SNDIO_SHARED AND NOT HAVE_SDL_LOADSO)
|
||||
message_warn("You must have SDL_LoadObject() support for dynamic sndio loading")
|
||||
endif()
|
||||
FindLibraryAndSONAME("sndio" LIBDIRS ${PKG_SNDIO_LIBRARY_DIRS})
|
||||
if(SDL_SNDIO_SHARED AND SNDIO_LIB AND HAVE_SDL_LOADSO)
|
||||
set(SDL_AUDIO_DRIVER_SNDIO_DYNAMIC "\"${SNDIO_LIB_SONAME}\"")
|
||||
set(HAVE_SNDIO_SHARED TRUE)
|
||||
else()
|
||||
list(APPEND EXTRA_LIBS ${PKG_SNDIO_LDFLAGS})
|
||||
endif()
|
||||
set(HAVE_SDL_AUDIO TRUE)
|
||||
endif()
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
# Requires:
|
||||
# - PkgCheckModules
|
||||
# Optional:
|
||||
@ -223,6 +194,35 @@ macro(CheckJACK)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
# Requires:
|
||||
# - PkgCheckModules
|
||||
# Optional:
|
||||
# - SDL_SNDIO_SHARED opt
|
||||
# - HAVE_SDL_LOADSO opt
|
||||
macro(CheckSNDIO)
|
||||
if(SDL_SNDIO)
|
||||
pkg_check_modules(PKG_SNDIO sndio)
|
||||
if(PKG_SNDIO_FOUND)
|
||||
set(HAVE_SNDIO TRUE)
|
||||
file(GLOB SNDIO_SOURCES ${SDL3_SOURCE_DIR}/src/audio/sndio/*.c)
|
||||
list(APPEND SOURCE_FILES ${SNDIO_SOURCES})
|
||||
set(SDL_AUDIO_DRIVER_SNDIO 1)
|
||||
list(APPEND EXTRA_CFLAGS ${PKG_SNDIO_CFLAGS})
|
||||
if(SDL_SNDIO_SHARED AND NOT HAVE_SDL_LOADSO)
|
||||
message_warn("You must have SDL_LoadObject() support for dynamic sndio loading")
|
||||
endif()
|
||||
FindLibraryAndSONAME("sndio" LIBDIRS ${PKG_SNDIO_LIBRARY_DIRS})
|
||||
if(SDL_SNDIO_SHARED AND SNDIO_LIB AND HAVE_SDL_LOADSO)
|
||||
set(SDL_AUDIO_DRIVER_SNDIO_DYNAMIC "\"${SNDIO_LIB_SONAME}\"")
|
||||
set(HAVE_SNDIO_SHARED TRUE)
|
||||
else()
|
||||
list(APPEND EXTRA_LIBS ${PKG_SNDIO_LDFLAGS})
|
||||
endif()
|
||||
set(HAVE_SDL_AUDIO TRUE)
|
||||
endif()
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
# Requires:
|
||||
# - SDL_LIBSAMPLERATE
|
||||
# Optional:
|
||||
|
Loading…
Reference in New Issue
Block a user