forked from rhasspy/piper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
37 lines (26 loc) · 1.09 KB
/
CMakeLists.txt
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
cmake_minimum_required(VERSION 3.13)
project(piper C CXX)
find_package(PkgConfig)
pkg_check_modules(SPDLOG REQUIRED spdlog)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
ADD_EXECUTABLE(piper main.cpp piper.cpp)
string(APPEND CMAKE_CXX_FLAGS " -Wall -Wextra -Wl,-rpath,'$ORIGIN'")
string(APPEND CMAKE_C_FLAGS " -Wall -Wextra")
set(PIPER_PHONEMIZE_ROOTDIR ${CMAKE_CURRENT_LIST_DIR}/../../lib/${CMAKE_HOST_SYSTEM_NAME}-${CMAKE_HOST_SYSTEM_PROCESSOR}/piper_phonemize)
target_link_libraries(piper
piper_phonemize
espeak-ng
onnxruntime
pthread
${SPDLOG_LIBRARIES})
if(NOT APPLE)
target_link_libraries(piper -static-libgcc -static-libstdc++)
endif()
target_link_directories(piper PUBLIC
${PIPER_PHONEMIZE_ROOTDIR}/lib)
target_include_directories(piper PUBLIC
${PIPER_PHONEMIZE_ROOTDIR}/include
${SPDLOG_INCLUDE_DIRS})
target_compile_options(piper PUBLIC
${SPDLOG_CFLAGS_OTHER})