4 # Finds the Sndio Library
6 # This will define the following target:
8 # ${APP_NAME_LC}::Sndio - the sndio library
10 if(NOT TARGET ${APP_NAME_LC}::${CMAKE_FIND_PACKAGE_NAME})
11 find_path(SNDIO_INCLUDE_DIR sndio.h)
12 find_library(SNDIO_LIBRARY sndio)
14 include(FindPackageHandleStandardArgs)
15 find_package_handle_standard_args(Sndio
16 REQUIRED_VARS SNDIO_LIBRARY SNDIO_INCLUDE_DIR)
19 list(APPEND AUDIO_BACKENDS_LIST "sndio")
20 set(AUDIO_BACKENDS_LIST ${AUDIO_BACKENDS_LIST} PARENT_SCOPE)
22 add_library(${APP_NAME_LC}::${CMAKE_FIND_PACKAGE_NAME} UNKNOWN IMPORTED)
23 set_target_properties(${APP_NAME_LC}::${CMAKE_FIND_PACKAGE_NAME} PROPERTIES
24 IMPORTED_LOCATION "${SNDIO_LIBRARY}"
25 INTERFACE_INCLUDE_DIRECTORIES "${SNDIO_INCLUDE_DIR}"
26 INTERFACE_COMPILE_DEFINITIONS HAS_SNDIO)