-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0dc549d
commit 583011a
Showing
2 changed files
with
28 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,34 @@ | ||
# - Try to find ESPEAK | ||
# Once done this will define | ||
# ESPEAK_FOUND - System has ESPEAK | ||
# ESPEAK_INCLUDE_DIRS - The ESPEAK include directories | ||
# ESPEAK_LIBRARIES - The libraries needed to use ESPEAK | ||
# Find the Espeak libraries and headers. | ||
# | ||
# Sets the following variables: | ||
# | ||
# ESPEAK_FOUND - system has Espeak | ||
# ESPEAK_INCLUDE_DIRS - Espeak include directories | ||
# ESPEAK_LIBRARIES - Espeak libraries | ||
# | ||
# ...and the following imported targets (requires CMake 2.8.11+): | ||
# | ||
# Espeak::Espeak - Espeak library (old API) | ||
|
||
#set(ESPEAK_DEFINITIONS ${PC_LIBXML_CFLAGS_OTHER}) | ||
|
||
find_path(ESPEAK_INCLUDE_DIR speak_lib.h | ||
$ENV{ESPEAK_DIR} | ||
$ENV{FFMPEG_DIR}/espeak | ||
/usr/local/include/espeak | ||
/usr/include/espeak | ||
) | ||
find_path(ESPEAK_INCLUDE_DIR NAMES speak_lib.h | ||
HINTS ENV ESPEAK_DIR | ||
PATH_SUFFIXES espeak) | ||
|
||
find_library(ESPEAK_LIBRARY NAMES espeak libespeak) | ||
|
||
include(FindPackageHandleStandardArgs) | ||
|
||
find_package_handle_standard_args(Espeak DEFAULT_MSG ESPEAK_INCLUDE_DIR ESPEAK_LIBRARY) | ||
|
||
mark_as_advanced(ESPEAK_INCLUDE_DIR ESPEAK_LIBRARY) | ||
if(Espeak_FOUND) | ||
set(ESPEAK_INCLUDE_DIRS ${ESPEAK_INCLUDE_DIR}) | ||
set(ESPEAK_LIBRARIES ${ESPEAK_LIBRARY}) | ||
|
||
set(ESPEAK_INCLUDE_DIRS ${ESPEAK_INCLUDE_DIR}) | ||
set(ESPEAK_LIBRARIES ${ESPEAK_LIBRARY}) | ||
if(NOT TARGET Espeak::Espeak) | ||
add_library(Espeak::Espeak UNKNOWN IMPORTED) | ||
|
||
set_target_properties(Espeak::Espeak PROPERTIES IMPORTED_LOCATION "${ESPEAK_LIBRARY}" | ||
INTERFACE_INCLUDE_DIRECTORIES "${ESPEAK_INCLUDE_DIR}") | ||
endif() | ||
endif() | ||
|
||
mark_as_advanced(ESPEAK_INCLUDE_DIR ESPEAK_LIBRARY) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters