Skip to content

Commit

Permalink
Rename FindSoundIO.cmake to FindSndIO.cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
kcat committed Apr 15, 2024
1 parent 7dcfe0f commit ad5519b
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 36 deletions.
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1001,13 +1001,13 @@ if(NOT WIN32)
endif()
option(ALSOFT_REQUIRE_SNDIO "Require SndIO backend" OFF)
if(ALSOFT_BACKEND_SNDIO)
find_package(SoundIO)
if(SOUNDIO_FOUND)
find_package(SndIO)
if(SNDIO_FOUND)
set(HAVE_SNDIO 1)
set(BACKENDS "${BACKENDS} SndIO (linked),")
set(ALC_OBJS ${ALC_OBJS} alc/backends/sndio.cpp alc/backends/sndio.h)
set(EXTRA_LIBS ${SOUNDIO_LIBRARIES} ${EXTRA_LIBS})
set(INC_PATHS ${INC_PATHS} ${SOUNDIO_INCLUDE_DIRS})
set(EXTRA_LIBS ${SNDIO_LIBRARIES} ${EXTRA_LIBS})
set(INC_PATHS ${INC_PATHS} ${SNDIO_INCLUDE_DIRS})
endif()
endif()
endif()
Expand Down
31 changes: 31 additions & 0 deletions cmake/FindSndIO.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# - Find SndIO includes and libraries
#
# SNDIO_FOUND - True if SNDIO_INCLUDE_DIR & SNDIO_LIBRARY are found
# SNDIO_LIBRARIES - Set when SNDIO_LIBRARY is found
# SNDIO_INCLUDE_DIRS - Set when SNDIO_INCLUDE_DIR is found
#
# SNDIO_INCLUDE_DIR - where to find sndio.h, etc.
# SNDIO_LIBRARY - the sndio library
#

find_path(SNDIO_INCLUDE_DIR
NAMES sndio.h
DOC "The SndIO include directory"
)

find_library(SNDIO_LIBRARY
NAMES sndio
DOC "The SndIO library"
)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(SndIO
REQUIRED_VARS SNDIO_LIBRARY SNDIO_INCLUDE_DIR
)

if(SNDIO_FOUND)
set(SNDIO_LIBRARIES ${SNDIO_LIBRARY})
set(SNDIO_INCLUDE_DIRS ${SNDIO_INCLUDE_DIR})
endif()

mark_as_advanced(SNDIO_INCLUDE_DIR SNDIO_LIBRARY)
32 changes: 0 additions & 32 deletions cmake/FindSoundIO.cmake

This file was deleted.

0 comments on commit ad5519b

Please sign in to comment.