1 # - Try to find jack-2.6
2 # Once done this will define
4 # JACK_FOUND - system has jack
5 # JACK_INCLUDE_DIRS - the jack include directory
6 # JACK_LIBRARIES - Link these to use jack
7 # JACK_DEFINITIONS - Compiler switches required for using jack
9 # Copyright (c) 2008 Andreas Schneider <mail@cynapses.org>
10 # Modified for other libraries by Lasse Kärkkäinen <tronic>
12 # Redistribution and use is allowed according to the terms of the New
14 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
17 if (JACK_LIBRARIES AND JACK_INCLUDE_DIRS)
20 else (JACK_LIBRARIES AND JACK_INCLUDE_DIRS)
21 # use pkg-config to get the directories and then use these values
22 # in the FIND_PATH() and FIND_LIBRARY() calls
23 if (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
25 pkgconfig(jack _JACK_INCLUDEDIR _JACK_LIBDIR _JACK_LDFLAGS _JACK_CFLAGS)
26 else (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
27 find_package(PkgConfig)
29 pkg_check_modules(_JACK jack)
30 endif (PKG_CONFIG_FOUND)
31 endif (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
32 find_path(JACK_INCLUDE_DIR
43 find_library(JACK_LIBRARY
69 if (JACK_INCLUDE_DIRS AND JACK_LIBRARIES)
71 endif (JACK_INCLUDE_DIRS AND JACK_LIBRARIES)
74 if (NOT JACK_FIND_QUIETLY)
75 message(STATUS "Found jack: ${JACK_LIBRARY}")
76 endif (NOT JACK_FIND_QUIETLY)
78 if (JACK_FIND_REQUIRED)
79 message(FATAL_ERROR "Could not find JACK")
80 endif (JACK_FIND_REQUIRED)
83 # show the JACK_INCLUDE_DIRS and JACK_LIBRARIES variables only in the advanced view
84 mark_as_advanced(JACK_INCLUDE_DIRS JACK_LIBRARIES)
86 endif (JACK_LIBRARIES AND JACK_INCLUDE_DIRS)