Mercurial > hg > sv-dependency-builds
annotate src/portaudio_20161030_catalina_patch/cmake_support/FindJack.cmake @ 83:ae30d91d2ffe
Replace these with versions built using an older toolset (so as to avoid ABI compatibilities when linking on Ubuntu 14.04 for packaging purposes)
author | Chris Cannam |
---|---|
date | Fri, 07 Feb 2020 11:51:13 +0000 |
parents | 4edcd14160a5 |
children |
rev | line source |
---|---|
Chris@55 | 1 # - Try to find jack |
Chris@55 | 2 # Once done this will define |
Chris@55 | 3 # JACK_FOUND - System has jack |
Chris@55 | 4 # JACK_INCLUDE_DIRS - The jack include directories |
Chris@55 | 5 # JACK_LIBRARIES - The libraries needed to use jack |
Chris@55 | 6 # JACK_DEFINITIONS - Compiler switches required for using jack |
Chris@55 | 7 |
Chris@55 | 8 if (JACK_LIBRARIES AND JACK_INCLUDE_DIRS) |
Chris@55 | 9 |
Chris@55 | 10 # in cache already |
Chris@55 | 11 set(JACK_FOUND TRUE) |
Chris@55 | 12 |
Chris@55 | 13 else (JACK_LIBRARIES AND JACK_INCLUDE_DIRS) |
Chris@55 | 14 |
Chris@55 | 15 set(JACK_DEFINITIONS "") |
Chris@55 | 16 |
Chris@55 | 17 # Look for pkg-config and use it (if available) to find package |
Chris@55 | 18 find_package(PkgConfig QUIET) |
Chris@55 | 19 if (PKG_CONFIG_FOUND) |
Chris@55 | 20 pkg_search_module(JACK QUIET jack) |
Chris@55 | 21 endif (PKG_CONFIG_FOUND) |
Chris@55 | 22 |
Chris@55 | 23 if (NOT JACK_FOUND) |
Chris@55 | 24 |
Chris@55 | 25 find_path(JACK_INCLUDE_DIR jack/jack.h HINTS ${JACK_INCLUDEDIR} ${JACK_INCLUDE_DIRS} PATH_SUFFIXES jack) |
Chris@55 | 26 find_library(JACK_LIBRARY NAMES jack HINTS ${JACK_LIBDIR} ${JACK_LIBRARY_DIRS}) |
Chris@55 | 27 |
Chris@55 | 28 set(JACK_LIBRARIES ${JACK_LIBRARY}) |
Chris@55 | 29 set(JACK_INCLUDE_DIRS ${JACK_INCLUDE_DIR}) |
Chris@55 | 30 |
Chris@55 | 31 include(FindPackageHandleStandardArgs) |
Chris@55 | 32 |
Chris@55 | 33 # Set JACK_FOUND if the library and include paths were found |
Chris@55 | 34 find_package_handle_standard_args(jack DEFAULT_MSG JACK_LIBRARY JACK_INCLUDE_DIR) |
Chris@55 | 35 |
Chris@55 | 36 # Don't show include/library paths in cmake GUI |
Chris@55 | 37 mark_as_advanced(JACK_INCLUDE_DIR JACK_LIBRARY) |
Chris@55 | 38 |
Chris@55 | 39 endif (NOT JACK_FOUND) |
Chris@55 | 40 |
Chris@55 | 41 endif (JACK_LIBRARIES AND JACK_INCLUDE_DIRS) |