Mercurial > hg > sv-dependency-builds
comparison src/portaudio_20161030_catalina_patch/cmake_support/FindJack.cmake @ 77:4edcd14160a5 pa_catalina
Duplicate for patch testing
| author | Chris Cannam |
|---|---|
| date | Wed, 30 Oct 2019 11:25:10 +0000 |
| parents | src/portaudio_20161030/cmake_support/FindJack.cmake@284acf908dcd |
| children |
comparison
equal
deleted
inserted
replaced
| 76:f3731af47c4b | 77:4edcd14160a5 |
|---|---|
| 1 # - Try to find jack | |
| 2 # Once done this will define | |
| 3 # JACK_FOUND - System has jack | |
| 4 # JACK_INCLUDE_DIRS - The jack include directories | |
| 5 # JACK_LIBRARIES - The libraries needed to use jack | |
| 6 # JACK_DEFINITIONS - Compiler switches required for using jack | |
| 7 | |
| 8 if (JACK_LIBRARIES AND JACK_INCLUDE_DIRS) | |
| 9 | |
| 10 # in cache already | |
| 11 set(JACK_FOUND TRUE) | |
| 12 | |
| 13 else (JACK_LIBRARIES AND JACK_INCLUDE_DIRS) | |
| 14 | |
| 15 set(JACK_DEFINITIONS "") | |
| 16 | |
| 17 # Look for pkg-config and use it (if available) to find package | |
| 18 find_package(PkgConfig QUIET) | |
| 19 if (PKG_CONFIG_FOUND) | |
| 20 pkg_search_module(JACK QUIET jack) | |
| 21 endif (PKG_CONFIG_FOUND) | |
| 22 | |
| 23 if (NOT JACK_FOUND) | |
| 24 | |
| 25 find_path(JACK_INCLUDE_DIR jack/jack.h HINTS ${JACK_INCLUDEDIR} ${JACK_INCLUDE_DIRS} PATH_SUFFIXES jack) | |
| 26 find_library(JACK_LIBRARY NAMES jack HINTS ${JACK_LIBDIR} ${JACK_LIBRARY_DIRS}) | |
| 27 | |
| 28 set(JACK_LIBRARIES ${JACK_LIBRARY}) | |
| 29 set(JACK_INCLUDE_DIRS ${JACK_INCLUDE_DIR}) | |
| 30 | |
| 31 include(FindPackageHandleStandardArgs) | |
| 32 | |
| 33 # Set JACK_FOUND if the library and include paths were found | |
| 34 find_package_handle_standard_args(jack DEFAULT_MSG JACK_LIBRARY JACK_INCLUDE_DIR) | |
| 35 | |
| 36 # Don't show include/library paths in cmake GUI | |
| 37 mark_as_advanced(JACK_INCLUDE_DIR JACK_LIBRARY) | |
| 38 | |
| 39 endif (NOT JACK_FOUND) | |
| 40 | |
| 41 endif (JACK_LIBRARIES AND JACK_INCLUDE_DIRS) |
