Ensure BUFFERSIZE is a power of 2
[openal-soft.git] / cmake / FindOSS.cmake
blobfeffb451674d24ac95fd1653bd41246afb3727a4
1 # - Find OSS includes
3 #   OSS_FOUND        - True if OSS_INCLUDE_DIR is found
4 #   OSS_INCLUDE_DIRS - Set when OSS_INCLUDE_DIR is found
5 #   OSS_LIBRARIES    - Set when OSS_LIBRARY is found
7 #   OSS_INCLUDE_DIR - where to find sys/soundcard.h, etc.
8 #   OSS_LIBRARY     - where to find libossaudio (optional).
11 find_path(OSS_INCLUDE_DIR
12           NAMES sys/soundcard.h
13           DOC "The OSS include directory"
16 find_library(OSS_LIBRARY
17              NAMES ossaudio
18              DOC "Optional OSS library"
21 include(FindPackageHandleStandardArgs)
22 find_package_handle_standard_args(OSS  REQUIRED_VARS OSS_INCLUDE_DIR)
24 if(OSS_FOUND)
25     set(OSS_INCLUDE_DIRS ${OSS_INCLUDE_DIR})
26     if(OSS_LIBRARY)
27         set(OSS_LIBRARIES ${OSS_LIBRARY})
28     else()
29         unset(OSS_LIBRARIES)
30     endif()
31 endif()
33 mark_as_advanced(OSS_INCLUDE_DIR OSS_LIBRARY)