aboutsummaryrefslogtreecommitdiffstats
path: root/cmake/FindSoundIO.cmake
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2014-04-19 06:35:14 -0700
committerChris Robinson <[email protected]>2014-04-19 06:35:14 -0700
commit887763e41c953b91105bba119da7a7265815f5e0 (patch)
tree8443332ee06bf28e78fe5e34baf66e55b18b42a5 /cmake/FindSoundIO.cmake
parent1d266aa8347fadfb0db34ae27df7b728c0ab2171 (diff)
Use find cmake modules for more backends
Diffstat (limited to 'cmake/FindSoundIO.cmake')
-rw-r--r--cmake/FindSoundIO.cmake32
1 files changed, 32 insertions, 0 deletions
diff --git a/cmake/FindSoundIO.cmake b/cmake/FindSoundIO.cmake
new file mode 100644
index 00000000..10450254
--- /dev/null
+++ b/cmake/FindSoundIO.cmake
@@ -0,0 +1,32 @@
+# - Find SoundIO (sndio) includes and libraries
+#
+# SOUNDIO_FOUND - True if SOUNDIO_INCLUDE_DIR & SOUNDIO_LIBRARY are
+# found
+# SOUNDIO_LIBRARIES - Set when SOUNDIO_LIBRARY is found
+# SOUNDIO_INCLUDE_DIRS - Set when SOUNDIO_INCLUDE_DIR is found
+#
+# SOUNDIO_INCLUDE_DIR - where to find sndio.h, etc.
+# SOUNDIO_LIBRARY - the sndio library
+#
+
+find_path(SOUNDIO_INCLUDE_DIR
+ NAMES sndio.h
+ DOC "The SoundIO include directory"
+)
+
+find_library(SOUNDIO_LIBRARY
+ NAMES sndio
+ DOC "The SoundIO library"
+)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(SoundIO
+ REQUIRED_VARS SOUNDIO_LIBRARY SOUNDIO_INCLUDE_DIR
+)
+
+if(SOUNDIO_FOUND)
+ set(SOUNDIO_LIBRARIES ${SOUNDIO_LIBRARY})
+ set(SOUNDIO_INCLUDE_DIRS ${SOUNDIO_INCLUDE_DIR})
+endif()
+
+mark_as_advanced(SOUNDIO_INCLUDE_DIR SOUNDIO_LIBRARY)