| 1 | commit 6f9df58efef9fd8262e37c717d25f37839f4cdc0
|
| 2 | Author: Shaun Ren <[email protected]>
|
| 3 | Date: Fri Sep 29 22:56:36 2023 -0400
|
| 4 |
|
| 5 | Add piper_phonemize.pc
|
| 6 |
|
| 7 | diff --git a/CMakeLists.txt b/CMakeLists.txt
|
| 8 | index a7b30a6..b7fd68c 100644
|
| 9 | |
| 10 | |
| 11 | @@ -166,6 +166,9 @@ endif()
|
| 12 |
|
| 13 | target_compile_features(piper_phonemize PUBLIC cxx_std_17)
|
| 14 |
|
| 15 | +set(pc_requires_private "espeak-ng libonnxruntime")
|
| 16 | +configure_file(piper_phonemize.pc.in piper_phonemize.pc @ONLY)
|
| 17 | +
|
| 18 | # ---- Declare executable ----
|
| 19 |
|
| 20 | add_executable(piper_phonemize_exe src/main.cpp src/phoneme_ids.cpp)
|
| 21 | @@ -249,6 +252,10 @@ install(
|
| 22 | PATTERN "*.h"
|
| 23 | PATTERN "*.hpp")
|
| 24 |
|
| 25 | +install(
|
| 26 | + FILES ${CMAKE_CURRENT_BINARY_DIR}/piper_phonemize.pc
|
| 27 | + DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
|
| 28 | +
|
| 29 | install(
|
| 30 | TARGETS piper_phonemize_exe
|
| 31 | ARCHIVE DESTINATION ${CMAKE_INSTALL_BINDIR})
|
| 32 | diff --git a/piper_phonemize.pc.in b/piper_phonemize.pc.in
|
| 33 | new file mode 100644
|
| 34 | index 0000000..57d32db
|
| 35 | |
| 36 | |
| 37 | @@ -0,0 +1,13 @@
|
| 38 | +prefix="@CMAKE_INSTALL_PREFIX@"
|
| 39 | +exec_prefix="${prefix}"
|
| 40 | +libdir="${prefix}/@CMAKE_INSTALL_LIBDIR@"
|
| 41 | +includedir="${prefix}/include"
|
| 42 | +
|
| 43 | +Name: @PROJECT_NAME@
|
| 44 | +Description: @CMAKE_PROJECT_DESCRIPTION@
|
| 45 | +URL: @CMAKE_PROJECT_HOMEPAGE_URL@
|
| 46 | +Version: @PROJECT_VERSION@
|
| 47 | +
|
| 48 | +Requires.private: @pc_requires_private@
|
| 49 | +Cflags: -I"${includedir}"
|
| 50 | +Libs: -L"${libdir}" -l@PROJECT_NAME@
|