-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathFindJack.cmake
36 lines (30 loc) · 922 Bytes
/
FindJack.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# - Try to find JACK
# Once done, this will define
#
# JACK_FOUND - system has JACK
# JACK_INCLUDE_DIRS - the JACK include directories
# JACK_LIBRARIES - link these to use JACK
# Use pkg-config to get hints about paths
find_package(PkgConfig QUIET)
if(PKG_CONFIG_FOUND)
pkg_check_modules(JACK_PKGCONF jack)
endif(PKG_CONFIG_FOUND)
# Include dir
find_path(JACK_INCLUDE_DIR
NAMES jack/jack.h
PATH_SUFFIXES include includes
PATHS ${JACK_PKGCONF_INCLUDE_DIRS}
)
# Library
find_library(JACK_LIBRARY
NAMES jack jack64 libjack libjack64
PATH_SUFFIXES lib
PATHS ${JACK_PKGCONF_LIBRARY_DIRS}
)
find_package(PackageHandleStandardArgs)
find_package_handle_standard_args(Jack DEFAULT_MSG JACK_LIBRARY JACK_INCLUDE_DIR)
if(JACK_FOUND)
set(JACK_LIBRARIES ${JACK_LIBRARY})
set(JACK_INCLUDE_DIRS ${JACK_INCLUDE_DIR})
endif(JACK_FOUND)
mark_as_advanced(JACK_LIBRARY JACK_LIBRARIES JACK_INCLUDE_DIR JACK_INCLUDE_DIRS)