File: FindLoudmouth.cmake

package info (click to toggle)
ball 1.5.0%2Bgit20180813.37fc53c-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 239,848 kB
  • sloc: cpp: 326,149; ansic: 4,208; python: 2,303; yacc: 1,778; lex: 1,099; xml: 958; sh: 322; makefile: 93
file content (30 lines) | stat: -rw-r--r-- 977 bytes parent folder | download | duplicates (7)
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
# - Try to find libloudmouth
# Once done, this will define
#
#  LIBLOUDMOUTH_FOUND - system has LIBLOUDMOUTH
#  LIBLOUDMOUTH_INCLUDE_DIRS - the LIBLOUDMOUTH include directories
#  LIBLOUDMOUTH_LIBRARIES - link these to use LIBLOUDMOUTH

INCLUDE(LibFindMacros)

# Use pkg-config to get hints about paths
LIBFIND_PKG_CHECK_MODULES(LIBLOUDMOUTH_PKGCONF loudmouth-1.0)

# Include dir
FIND_PATH(LIBLOUDMOUTH_INCLUDE_DIR
  NAMES loudmouth/loudmouth.h
	  PATHS ${LIBLOUDMOUTH_PKGCONF_INCLUDE_DIRS}
		PATH_SUFFIXES loudmouth-1.0
)

# Finally the library itself
FIND_LIBRARY(LIBLOUDMOUTH_LIBRARY
  NAMES loudmouth-1
	  PATHS ${LIBLOUDMOUTH_PKGCONF_LIBRARY_DIRS}
)

# Set the include dir variables and the libraries and let libfind_process do the rest.
# NOTE: Singular variables for this library, plural for libraries this this lib depends on.
SET(LIBLOUDMOUTH_PROCESS_INCLUDES LIBLOUDMOUTH_INCLUDE_DIR)
SET(LIBLOUDMOUTH_PROCESS_LIBS LIBLOUDMOUTH_LIBRARY)
LIBFIND_PROCESS(LIBLOUDMOUTH)