Debian Codegraph @

cmake/FindOpenDbx.cmake

raw
1 # - Try to find the OpenDbx development libraries
2 # Once done this will define
3 #
4 # OPENDBX_FOUND - system has opendbx-devel
5 # OPENDBX_INCLUDE_DIR - opendbx include directory
6 # OPENDBX_LIBRARIES - opendbx (if found) library
7
8 include(LibFindMacros)
9
10 # Use pkg-config to get hints about paths
11 libfind_pkg_check_modules(OPENDBX_PKGCONF opendbx)
12
13 # Include dir
14 find_path(OPENDBX_INCLUDE_DIR
15 NAMES opendbx/api.h
16 PATHS ${OPENDBX_PKGCONF_INCLUDE_DIRS}
17 )
18
19 # Finally the library itself
20 find_library(OPENDBX_LIBRARY
21 NAMES opendbx
22 PATHS ${OPENDBX_PKGCONF_LIBRARY_DIRS}
23 )
24
25 # Set the include dir variables and the libraries and let libfind_process do the rest.
26 # NOTE: Singular variables for this library, plural for libraries this this lib depends on.
27 set(OPENDBX_PROCESS_INCLUDES OPENDBX_INCLUDE_DIR)
28 set(OPENDBX_PROCESS_LIBS OPENDBX_LIBRARY)
29 libfind_process(OPENDBX)