| 1 |
# Try to find JACK |
| 2 |
# This will define the following variables: |
| 3 |
# |
| 4 |
# JACK_FOUND - Whether Jack was found. |
| 5 |
# JACK_INCLUDE_DIRS - Jack include directories. |
| 6 |
# JACK_LIBRARIES - Jack libraries. |
| 7 |
|
| 8 |
include(FindPackageHandleStandardArgs) |
| 9 |
|
| 10 |
if(JACK_LIBRARIES AND JACK_INCLUDE_DIRS) |
| 11 |
|
| 12 |
# in cache already |
| 13 |
set(JACK_FOUND TRUE) |
| 14 |
|
| 15 |
else() |
| 16 |
|
| 17 |
find_package(PkgConfig) |
| 18 |
if(PKG_CONFIG_FOUND) |
| 19 |
pkg_check_modules(_JACK jack) |
| 20 |
endif(PKG_CONFIG_FOUND) |
| 21 |
|
| 22 |
find_path(JACK_INCLUDE_DIR |
| 23 |
NAMES |
| 24 |
jack/jack.h |
| 25 |
PATHS |
| 26 |
${_JACK_INCLUDEDIR} |
| 27 |
) |
| 28 |
|
| 29 |
find_library(JACK_LIBRARY |
| 30 |
NAMES |
| 31 |
jack |
| 32 |
PATHS |
| 33 |
${_JACK_LIBDIR} |
| 34 |
) |
| 35 |
|
| 36 |
set(JACK_INCLUDE_DIRS |
| 37 |
${JACK_INCLUDE_DIR} |
| 38 |
) |
| 39 |
|
| 40 |
set(JACK_LIBRARIES |
| 41 |
${JACK_LIBRARY} |
| 42 |
) |
| 43 |
|
| 44 |
find_package_handle_standard_args(Jack DEFAULT_MSG JACK_LIBRARIES JACK_INCLUDE_DIRS) |
| 45 |
|
| 46 |
# show the JACK_INCLUDE_DIRS and JACK_LIBRARIES variables only in the advanced view |
| 47 |
mark_as_advanced(JACK_INCLUDE_DIR JACK_LIBRARY JACK_INCLUDE_DIRS JACK_LIBRARIES) |
| 48 |
|
| 49 |
endif() |
| 50 |
|