summaryrefslogtreecommitdiff
path: root/3rdparty/portaudio/cmake_support/FindJack.cmake
diff options
context:
space:
mode:
authorsanine <sanine.not@pm.me>2022-08-27 23:52:56 -0500
committersanine <sanine.not@pm.me>2022-08-27 23:52:56 -0500
commita4dd0ad63c00f4dee3b86dfd3075d1d61b2b3180 (patch)
tree13bd5bfa15e6fea2a12f176bae79adf9c6fd0933 /3rdparty/portaudio/cmake_support/FindJack.cmake
parentbde3e4f1bb7b8f8abca0884a7d994ee1c17a66b1 (diff)
add plibsys
Diffstat (limited to '3rdparty/portaudio/cmake_support/FindJack.cmake')
-rw-r--r--3rdparty/portaudio/cmake_support/FindJack.cmake41
1 files changed, 41 insertions, 0 deletions
diff --git a/3rdparty/portaudio/cmake_support/FindJack.cmake b/3rdparty/portaudio/cmake_support/FindJack.cmake
new file mode 100644
index 0000000..96e0b50
--- /dev/null
+++ b/3rdparty/portaudio/cmake_support/FindJack.cmake
@@ -0,0 +1,41 @@
+# - Try to find jack
+# Once done this will define
+# JACK_FOUND - System has jack
+# JACK_INCLUDE_DIRS - The jack include directories
+# JACK_LIBRARIES - The libraries needed to use jack
+# JACK_DEFINITIONS - Compiler switches required for using jack
+
+if (JACK_LIBRARIES AND JACK_INCLUDE_DIRS)
+
+ # in cache already
+ set(JACK_FOUND TRUE)
+
+else (JACK_LIBRARIES AND JACK_INCLUDE_DIRS)
+
+ set(JACK_DEFINITIONS "")
+
+ # Look for pkg-config and use it (if available) to find package
+ find_package(PkgConfig QUIET)
+ if (PKG_CONFIG_FOUND)
+ pkg_search_module(JACK QUIET jack)
+ endif (PKG_CONFIG_FOUND)
+
+ if (NOT JACK_FOUND)
+
+ find_path(JACK_INCLUDE_DIR jack/jack.h HINTS ${JACK_INCLUDEDIR} ${JACK_INCLUDE_DIRS} PATH_SUFFIXES jack)
+ find_library(JACK_LIBRARY NAMES jack HINTS ${JACK_LIBDIR} ${JACK_LIBRARY_DIRS})
+
+ set(JACK_LIBRARIES ${JACK_LIBRARY})
+ set(JACK_INCLUDE_DIRS ${JACK_INCLUDE_DIR})
+
+ include(FindPackageHandleStandardArgs)
+
+ # Set JACK_FOUND if the library and include paths were found
+ find_package_handle_standard_args(jack DEFAULT_MSG JACK_LIBRARY JACK_INCLUDE_DIR)
+
+ # Don't show include/library paths in cmake GUI
+ mark_as_advanced(JACK_INCLUDE_DIR JACK_LIBRARY)
+
+ endif (NOT JACK_FOUND)
+
+endif (JACK_LIBRARIES AND JACK_INCLUDE_DIRS)