blob: 9b3e73034c3ab8b4e9e6276c2ba9117a70fda975 (
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
|
From fcebf138edcb96830180f6e970a1cdbd17930058 Mon Sep 17 00:00:00 2001
From: memchr <memchr@proton.me>
Date: Mon, 21 Oct 2024 06:07:48 +0000
Subject: [PATCH 1/4] support building as static library
---
CMakeLists.txt | 3 ++-
Makefile | 5 +++++
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ec7b501..bd809cc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,6 +1,7 @@
cmake_minimum_required(VERSION 3.14)
set(CMAKE_VERBOSE_MAKEFILE off)
+option(BUILD_SHARED_LIBS "Build shared libraries" ON)
project(
piper_phonemize
@@ -22,7 +23,7 @@ elseif(NOT APPLE)
endif()
add_library(
- piper_phonemize SHARED
+ piper_phonemize
src/phonemize.cpp
src/phoneme_ids.cpp
src/tashkeel.cpp
diff --git a/Makefile b/Makefile
index 2ee7ced..cc0e448 100644
--- a/Makefile
+++ b/Makefile
@@ -6,5 +6,10 @@ all:
cd build && ctest --config Release
cmake --install build
+static:
+ cmake -Bbuild -GNinja -DCMAKE_INSTALL_PREFIX=install -DUSE_SYSTEM_ONNXRUNTIME=ON -DBUILD_SHARED_LIBS=OFF
+ cmake --build build --config Release
+ cmake --install build
+
clean:
rm -rf build install
--
2.47.0
|