File tree 7 files changed +1150
-0
lines changed
7 files changed +1150
-0
lines changed Original file line number Diff line number Diff line change @@ -111,6 +111,11 @@ else()
111
111
install (DIRECTORY include TYPE INCLUDE )
112
112
install (DIRECTORY ${CMAKE_BINARY_DIR} /include TYPE INCLUDE )
113
113
install (FILES ${CMAKE_BINARY_DIR} /pocketsphinx.pc DESTINATION ${CMAKE_INSTALL_LIBDIR} /pkgconfig)
114
+
115
+ option (BUILD_GSTREAMER "Build GStreamer plugin" OFF )
116
+ if (BUILD_GSTREAMER)
117
+ add_subdirectory (gst)
118
+ endif ()
114
119
endif ()
115
120
116
121
# Can print this at the end, just to know what it was
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ include setup.cfg
15
15
include setup.py
16
16
include sphinx_config.h.in
17
17
recursive-include cython *
18
+ recursive-include gst *
18
19
recursive-include docs *
19
20
recursive-include doxygen *
20
21
recursive-include examples *
Original file line number Diff line number Diff line change
1
+ find_package (PkgConfig REQUIRED)
2
+ pkg_check_modules(GOBJECT gobject-2.0 REQUIRED)
3
+ pkg_check_modules(GSTREAMER gstreamer-1.0 gstreamer-base-1.0)
4
+ add_library (gstpocketsphinx SHARED gstpocketsphinx.c)
5
+ set_property (TARGET pocketsphinx PROPERTY POSITION_INDEPENDENT_CODE on )
6
+ target_link_libraries (gstpocketsphinx PUBLIC
7
+ pocketsphinx
8
+ ${GSTREAMER_LIBRARIES}
9
+ ${GOBJECT_LIBRARIES}
10
+ )
11
+ target_include_directories (
12
+ gstpocketsphinx PRIVATE ${CMAKE_BINARY_DIR}
13
+ gstpocketsphinx PRIVATE ${CMAKE_SOURCE_DIR} /src
14
+ gstpocketsphinx PUBLIC ${CMAKE_SOURCE_DIR} /include
15
+ gstpocketsphinx PUBLIC ${CMAKE_BINARY_DIR} /include
16
+ gstpocketsphinx INTERFACE ${CMAKE_SOURCE_DIR} /include
17
+ gstpocketsphinx INTERFACE ${CMAKE_BINARY_DIR} /include
18
+ gstpocketsphinx PUBLIC ${GSTREAMER_INCLUDE_DIRS} ${GOBJECT_INCLUDE_DIRS}
19
+ )
20
+ message ("Installing GStreamer plugin to ${CMAKE_INSTALL_FULL_LIBDIR} /gstreamer-1.0" )
21
+ install (TARGETS gstpocketsphinx LIBRARY DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR} /gstreamer-1.0)
You can’t perform that action at this time.
0 commit comments