aboutsummaryrefslogtreecommitdiffstats
path: root/cmake/FindPortAudio.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/FindPortAudio.cmake
parent1d266aa8347fadfb0db34ae27df7b728c0ab2171 (diff)
Use find cmake modules for more backends
Diffstat (limited to 'cmake/FindPortAudio.cmake')
-rw-r--r--cmake/FindPortAudio.cmake32
1 files changed, 32 insertions, 0 deletions
diff --git a/cmake/FindPortAudio.cmake b/cmake/FindPortAudio.cmake
new file mode 100644
index 00000000..fad2313d
--- /dev/null
+++ b/cmake/FindPortAudio.cmake
@@ -0,0 +1,32 @@
+# - Find PortAudio includes and libraries
+#
+# PORTAUDIO_FOUND - True if PORTAUDIO_INCLUDE_DIR & PORTAUDIO_LIBRARY
+# are found
+# PORTAUDIO_LIBRARIES - Set when PORTAUDIO_LIBRARY is found
+# PORTAUDIO_INCLUDE_DIRS - Set when PORTAUDIO_INCLUDE_DIR is found
+#
+# PORTAUDIO_INCLUDE_DIR - where to find portaudio.h, etc.
+# PORTAUDIO_LIBRARY - the portaudio library
+#
+
+find_path(PORTAUDIO_INCLUDE_DIR
+ NAMES portaudio.h
+ DOC "The PortAudio include directory"
+)
+
+find_library(PORTAUDIO_LIBRARY
+ NAMES portaudio
+ DOC "The PortAudio library"
+)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(PortAudio
+ REQUIRED_VARS PORTAUDIO_LIBRARY PORTAUDIO_INCLUDE_DIR
+)
+
+if(PORTAUDIO_FOUND)
+ set(PORTAUDIO_LIBRARIES ${PORTAUDIO_LIBRARY})
+ set(PORTAUDIO_INCLUDE_DIRS ${PORTAUDIO_INCLUDE_DIR})
+endif()
+
+mark_as_advanced(PORTAUDIO_INCLUDE_DIR PORTAUDIO_LIBRARY)