summarylogtreecommitdiffstats
path: root/0002-Use-bundled-piper-phonemize-library.patch
blob: c28570908d32562dd9c4b21b37a0d4bbede2e707 (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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
From 83b35adb1c6162bf2312e43adfd06821c19a9de0 Mon Sep 17 00:00:00 2001
From: memchr <memchr@proton.me>
Date: Mon, 21 Oct 2024 09:28:57 +0000
Subject: [PATCH 2/3] Use bundled piper-phonemize library

---
 CMakeLists.txt | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index fb1f5f6..e2f0da4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2,6 +2,8 @@ cmake_minimum_required(VERSION 3.13)
 
 project(piper C CXX)
 
+option(PIPER_PHONEMIZE_DIR "piper-phonemize library location" "")
+
 file(READ "${CMAKE_CURRENT_LIST_DIR}/VERSION" piper_version)
 
 set(CMAKE_CXX_STANDARD 17)
@@ -61,7 +63,6 @@ endif()
 find_package(PkgConfig)
 pkg_check_modules(FMT REQUIRED fmt)
 pkg_check_modules(ONNXRUNTIME REQUIRED libonnxruntime)
-pkg_check_modules(PIPER_PHONEMIZE REQUIRED piper_phonemize)
 pkg_check_modules(SPDLOG REQUIRED spdlog)
 
 if(FALSE)
@@ -99,12 +100,14 @@ target_link_directories(piper PUBLIC
   ${FMT_LIBRARY_DIRS}
   ${SPDLOG_LIBRARY_DIRS}
   ${ONNXRUNTIME_LIBRARY_DIRS}
+  ${PIPER_PHONEMIZE_DIR}/lib
 )
 
 target_include_directories(piper PUBLIC
   ${FMT_INCLUDE_DIRS}
   ${SPDLOG_INCLUDE_DIRS}
   ${ONNXRUNTIME_INCLUDE_DIRS}
+  ${PIPER_PHONEMIZE_DIR}/include
 )
 
 target_compile_definitions(piper PUBLIC _PIPER_VERSION="${piper_version}")
@@ -124,6 +127,7 @@ target_include_directories(
   ${FMT_INCLUDE_DIRS}
   ${SPDLOG_INCLUDE_DIRS}
   ${ONNXRUNTIME_INCLUDE_DIRS}
+  ${PIPER_PHONEMIZE_DIR}/include
 )
 
 target_link_directories(
@@ -131,6 +135,7 @@ target_link_directories(
   ${FMT_LIBRARY_DIRS}
   ${SPDLOG_LIBRARY_DIRS}
   ${ONNXRUNTIME_LIBRARY_DIRS}
+  ${PIPER_PHONEMIZE_DIR}/lib
 )
 
 target_link_libraries(test_piper PUBLIC
-- 
2.47.0