From ef09f452f76eccfabd91c7e8a040b9f8e55f4508 Mon Sep 17 00:00:00 2001 From: Robert Dunmire III Date: Sun, 12 Jan 2025 11:44:24 -0500 Subject: [PATCH] Update piper_CMakeLists.txt --- patches/piper_CMakeLists.txt | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/patches/piper_CMakeLists.txt b/patches/piper_CMakeLists.txt index 528ddc9..a7eec10 100644 --- a/patches/piper_CMakeLists.txt +++ b/patches/piper_CMakeLists.txt @@ -41,6 +41,21 @@ if(NOT DEFINED FMT_DIR) add_dependencies(test_piper fmt_external) endif() +# ---- piper-phonemize --- + +if(NOT DEFINED PIPER_PHONEMIZE_DIR) + set(PIPER_PHONEMIZE_DIR "${CMAKE_CURRENT_BINARY_DIR}/pi") + set(ONNXRUNTIME_VERSION "$ENV{ONNXRUNTIME_VERSION}") + ExternalProject_Add( + piper_phonemize_external + PREFIX "${CMAKE_CURRENT_BINARY_DIR}/p" + URL "https://github.com/rhasspy/piper-phonemize/archive/refs/heads/master.zip" + CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${PIPER_PHONEMIZE_DIR} -DONNXRUNTIME_VERSION=${ONNXRUNTIME_VERSION} + ) + add_dependencies(piper piper_phonemize_external) + add_dependencies(test_piper piper_phonemize_external) +endif() + # ---- spdlog --- if(NOT DEFINED SPDLOG_DIR) @@ -56,21 +71,6 @@ if(NOT DEFINED SPDLOG_DIR) add_dependencies(test_piper spdlog_external) endif() -# ---- piper-phonemize --- - -if(NOT DEFINED PIPER_PHONEMIZE_DIR) - set(PIPER_PHONEMIZE_DIR "${CMAKE_CURRENT_BINARY_DIR}/pi") - set(ONNXRUNTIME_VERSION "$ENV{ONNXRUNTIME_VERSION}") - ExternalProject_Add( - piper_phonemize_external - PREFIX "${CMAKE_CURRENT_BINARY_DIR}/p" - URL "https://github.com/rhasspy/piper-phonemize/archive/refs/heads/master.zip" - CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${PIPER_PHONEMIZE_DIR} - ) - add_dependencies(piper piper_phonemize_external) - add_dependencies(test_piper piper_phonemize_external) -endif() - # ---- Declare executable ---- if((NOT MSVC) AND (NOT APPLE))