aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake')
-rw-r--r--cmake/Modules/FindCsound.cmake29
-rw-r--r--cmake/Modules/FindEST.cmake61
-rw-r--r--cmake/Modules/FindFestival.cmake47
3 files changed, 137 insertions, 0 deletions
diff --git a/cmake/Modules/FindCsound.cmake b/cmake/Modules/FindCsound.cmake
new file mode 100644
index 0000000..e55b269
--- /dev/null
+++ b/cmake/Modules/FindCsound.cmake
@@ -0,0 +1,29 @@
+# Try to find the Csound library.
+# Once done this will define:
+# CSOUND_FOUND - System has the Csound library
+# CSOUND_INCLUDE_DIRS - The Csound include directories.
+# CSOUND_LIBRARIES - The libraries needed to use the Csound library.
+
+if(APPLE)
+find_path(CSOUND_INCLUDE_DIR csound.h HINTS /Library/Frameworks/CsoundLib64.framework/Headers
+"$ENV{HOME}/Library/Frameworks/CsoundLib64.framework/Headers")
+else()
+find_path(CSOUND_INCLUDE_DIR csound.h PATH_SUFFIXES csound)
+endif()
+
+if(APPLE)
+find_library(CSOUND_LIBRARY NAMES CsoundLib64 HINTS /Library/Frameworks/CsoundLib64.framework/
+"$ENV{HOME}/Library/Frameworks/CsoundLib64.framework")
+else()
+find_library(CSOUND_LIBRARY NAMES csound64 csound)
+endif()
+
+include(FindPackageHandleStandardArgs)
+# handle the QUIETLY and REQUIRED arguments and set CSOUND_FOUND to TRUE
+# if all listed variables are TRUE
+find_package_handle_standard_args(CSOUND
+ CSOUND_LIBRARY CSOUND_INCLUDE_DIR)
+mark_as_advanced(CSOUND_INCLUDE_DIR CSOUND_LIBRARY)
+
+set(CSOUND_INCLUDE_DIRS ${CSOUND_INCLUDE_DIR})
+set(CSOUND_LIBRARIES ${CSOUND_LIBRARY} )
diff --git a/cmake/Modules/FindEST.cmake b/cmake/Modules/FindEST.cmake
new file mode 100644
index 0000000..00c83b6
--- /dev/null
+++ b/cmake/Modules/FindEST.cmake
@@ -0,0 +1,61 @@
+# - Try to find EST
+# Once done this will define
+#
+# EST_FOUND - set to true if EST was found
+# EST_LIBRARIES - link these to use EST
+# EST_INCLUDE_DIR - path to EST header files
+
+if (EST_LIBRARIES AND EST_INCLUDE_DIR)
+ # in cache already
+ set(EST_FOUND TRUE)
+else (EST_LIBRARIES AND EST_INCLUDE_DIR)
+
+ set(CANDIDATE_LIB_DIR
+ /usr/lib
+ /usr/local/lib
+ /usr/lib/pulse
+ /usr/local/lib/speech_tools
+ /usr/local/speech_tools/lib
+ /opt/speech_tools/lib
+ )
+
+ set(CANDIDATE_INC_DIR
+ /usr/include
+ /usr/include/speech_tools
+ /usr/local/include
+ /usr/local/include/speech_tools
+ /usr/local/speech_tools/include
+ /opt/speech_tools/include
+ /usr/include/estools
+ )
+
+ find_path(EST_INCLUDE_DIR EST.h ${CANDIDATE_INC_DIR})
+ #find_library(ESD_LIBRARY esd ${CANDIDATE_LIB_DIR})
+ find_library(ESTOOLS_LIBRARY estools ${CANDIDATE_LIB_DIR})
+ find_library(ESTSTRING_LIBRARY eststring ${CANDIDATE_LIB_DIR})
+ find_library(ESTBASE_LIBRARY estbase ${CANDIDATE_LIB_DIR})
+
+ set(EST_LIBRARIES
+ #${ESD_LIBRARY}
+ ${ESTOOLS_LIBRARY}
+ ${ESTSTRING_LIBRARY}
+ ${ESTBASE_LIBRARY}
+ )
+
+ # status output
+ include(FindPackageHandleStandardArgs)
+
+ find_package_handle_standard_args(EST
+ DEFAULT_MSG
+ #ESD_LIBRARY
+ ESTOOLS_LIBRARY
+ ESTSTRING_LIBRARY
+ ESTBASE_LIBRARY
+ EST_INCLUDE_DIR
+ )
+ mark_as_advanced(
+ EST_INCLUDE_DIR
+ EST_LIBRARIES
+ )
+
+endif (EST_LIBRARIES AND EST_INCLUDE_DIR)
diff --git a/cmake/Modules/FindFestival.cmake b/cmake/Modules/FindFestival.cmake
new file mode 100644
index 0000000..be453cc
--- /dev/null
+++ b/cmake/Modules/FindFestival.cmake
@@ -0,0 +1,47 @@
+# - Try to find Festival and EST
+# Once done this will define
+#
+# Festival_FOUND - set to true if Festival was found
+# Festival_LIBRARIES - link these to use Festival
+# Festival_INCLUDE_DIR - path to Festival header files
+
+if (Festival_LIBRARIES AND Festival_INCLUDE_DIR)
+ # in cache already
+ set(Festival_FOUND TRUE)
+else (Festival_LIBRARIES AND Festival_INCLUDE_DIR)
+
+ set(CANDIDATE_LIB_DIR
+ /usr/lib
+ /usr/local/lib
+ /usr/lib/festival
+ /usr/local/lib/festival
+ /usr/local/festival/lib
+ /opt/festival/lib
+ )
+
+ set(CANDIDATE_INC_DIR
+ /usr/include
+ /usr/include/festival
+ /usr/local/include
+ /usr/local/include/festival
+ /usr/local/festival/include
+ /opt/festival/include
+ )
+
+ find_path(Festival_INCLUDE_DIR festival.h ${CANDIDATE_INC_DIR})
+ find_library(Festival_LIBRARIES Festival ${CANDIDATE_LIB_DIR})
+
+ # status output
+ include(FindPackageHandleStandardArgs)
+
+ find_package_handle_standard_args(Festival
+ DEFAULT_MSG
+ Festival_LIBRARIES
+ Festival_INCLUDE_DIR
+ )
+ mark_as_advanced(
+ Festival_INCLUDE_DIR
+ Festival_LIBRARIES
+ )
+
+endif (Festival_LIBRARIES AND Festival_INCLUDE_DIR)