From feaddd7b6eb294e55caa7e61ceed7579e140f454 Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Tue, 28 Nov 2023 19:21:26 +0100 Subject: [PATCH] cmake: add ESPEAK_NG_VERSION this lets to specify a custom espeak-ng version See also: https://github.com/mudler/LocalAI/issues/1356 --- CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b3a144d..6ae82bb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -99,12 +99,14 @@ endif() if(NOT DEFINED ESPEAK_NG_DIR) set(ESPEAK_NG_DIR "${CMAKE_CURRENT_BINARY_DIR}/ei") - + if(NOT DEFINED ESPEAK_NG_VERSION) + set(ESPEAK_NG_VERSION "master") + endif() include(ExternalProject) ExternalProject_Add( espeak_ng_external PREFIX "${CMAKE_CURRENT_BINARY_DIR}/e" - URL "https://github.com/rhasspy/espeak-ng/archive/refs/heads/master.zip" + URL "https://github.com/rhasspy/espeak-ng/archive/refs/heads/${ESPEAK_NG_VERSION}.zip" CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${ESPEAK_NG_DIR} CMAKE_ARGS -DUSE_ASYNC:BOOL=OFF CMAKE_ARGS -DBUILD_SHARED_LIBS:BOOL=ON