Use the pkg-config file when checking for sndio.

This commit is contained in:
Brad Smith
2022-09-29 20:31:20 -04:00
committed by Sam Lantinga
parent fc720321b3
commit f48823181b
2 changed files with 5 additions and 18 deletions

View File

@@ -293,16 +293,14 @@ macro(CheckNAS)
endmacro()
# Requires:
# - n/a
# - PkgCheckModules
# Optional:
# - SDL_SNDIO_SHARED opt
# - HAVE_SDL_LOADSO opt
macro(CheckSNDIO)
if(SDL_SNDIO)
# TODO: set include paths properly, so the sndio headers are found
check_include_file(sndio.h HAVE_SNDIO_H)
find_library(D_SNDIO_LIB sndio)
if(HAVE_SNDIO_H AND D_SNDIO_LIB)
pkg_check_modules(PKG_SNDIO sndio)
if(PKG_SNDIO_FOUND)
set(HAVE_SNDIO TRUE)
file(GLOB SNDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/sndio/*.c)
list(APPEND SOURCE_FILES ${SNDIO_SOURCES})