Skip to content

Commit d813a6e

Browse files
committed
Move PronounceDict class into service, rather than public interface
1 parent 48e2b37 commit d813a6e

File tree

6 files changed

+40
-10
lines changed

6 files changed

+40
-10
lines changed

src/libunityvoice/CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ set(
66
)
77

88
set(
9-
LIB_UNITY_VOICE_SOURCES
10-
PronounceDict.cpp
9+
LIB_UNITY_VOICE_SOURCES
1110
UnityVoice.cpp
1211
)
1312

src/service/CMakeLists.txt

Lines changed: 36 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11

2+
#########################################
3+
# Service library
4+
#########################################
5+
26
set(
3-
UNITY_VOICE_SOURCES
4-
VoiceService.cpp
5-
main.cpp
7+
UNITY_VOICE_SOURCES
8+
PronounceDict.cpp
9+
VoiceService.cpp
10+
main.cpp
611
)
712

813
qt5_add_dbus_adaptor(
@@ -13,8 +18,9 @@ qt5_add_dbus_adaptor(
1318
VoiceAdaptor
1419
)
1520

16-
add_executable(
21+
add_library(
1722
unity-voice-service
23+
STATIC
1824
${UNITY_VOICE_SOURCES}
1925
)
2026

@@ -26,11 +32,35 @@ qt5_use_modules(
2632

2733
target_link_libraries(
2834
unity-voice-service
29-
unityvoice
3035
${POCKETSPHINX_LIBRARIES}
3136
)
3237

38+
#########################################
39+
# Service binary
40+
#########################################
41+
42+
add_executable(
43+
unity-voice-service-bin
44+
${UNITY_VOICE_SOURCES}
45+
)
46+
47+
set_target_properties(
48+
unity-voice-service-bin
49+
PROPERTIES
50+
OUTPUT_NAME "unity-voice-service"
51+
)
52+
53+
target_link_libraries(
54+
unity-voice-service-bin
55+
unity-voice-service
56+
)
57+
58+
qt5_use_modules(
59+
unity-voice-service-bin
60+
Core
61+
)
62+
3363
install(
34-
TARGETS unity-voice-service
64+
TARGETS unity-voice-service-bin
3565
RUNTIME DESTINATION ${CMAKE_INSTALL_LIBEXECDIR}
3666
)
File renamed without changes.
File renamed without changes.

src/service/VoiceService.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#ifndef VOICESERVICE_H_
2020
#define VOICESERVICE_H_
2121

22-
#include <libunityvoice/PronounceDict.h>
22+
#include <service/PronounceDict.h>
2323

2424
#include <QList>
2525
#include <QString>

tests/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ add_definitions(-DPRONOUCE_DICT_HTK="${CMAKE_CURRENT_SOURCE_DIR}/data/test-prono
1919

2020
set(
2121
UNIT_TESTS_SRC
22-
TestPronounceDict.cpp
22+
TestPronounceDict.cpp
2323
TestVoiceService.cpp
2424
main.cpp
2525
)
@@ -39,6 +39,7 @@ qt5_use_modules(
3939
target_link_libraries(
4040
unit-tests
4141
unityvoice
42+
unity-voice-service
4243
${POCKETSPHINX_LIBRARIES}
4344
${QTDBUSTEST_LIBRARIES}
4445
${GTEST_LIBRARIES}

0 commit comments

Comments
 (0)