summaryrefslogtreecommitdiff
path: root/cmake/Findespeak.cmake
blob: 6d390a9a8fee51ac0f91b37d2e4a225cea24188d (plain)
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
# - Try to find espeak (with libespeak)
# Once done, this will define
#
#  espeak_FOUND - system has Glib
#  espeak_INCLUDE_DIRS - the Glib include directories
#  espeak_LIBRARIES - link these to use Glib

include(LibFindMacros)

# espeak-related libraries
find_path(espeak_INCLUDE_DIR
  NAMES speak_lib.h
  PATHS /usr /sw/include
  PATH_SUFFIXES espeak
)

# Finally the library itself
find_library(espeak_LIBRARY
  NAMES libespeak.so libespeak.a
  PATHS /sw/lib
)

# 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(espeak_PROCESS_INCLUDES espeak_INCLUDE_DIR)
set(espeak_PROCESS_LIBS espeak_LIBRARY)
libfind_process(espeak)