summaryrefslogtreecommitdiffstats
path: root/src/uscxml/plugins/invoker/CMakeLists.txt
blob: 4e74a8ccc0106cd5ee1c109a9092dd64deae77d9 (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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
# sample invoker - include to make sure it compiles
file(GLOB_RECURSE SAMPLE_INVOKER
	sample/*.cpp
	sample/*.h
)
source_group("Invoker\\sample" FILES ${SAMPLE_INVOKER})
if (BUILD_AS_PLUGINS)
	add_library(
		invoker_sample SHARED 
		${SAMPLE_INVOKER})
	target_link_libraries(invoker_sample uscxml)
	set_target_properties(invoker_sample PROPERTIES FOLDER "Plugin Invoker")
else()
	list (APPEND USCXML_FILES ${SAMPLE_INVOKER})
endif()


# DirMon invoker to watch for filesystem changes

file(GLOB_RECURSE DIRMON_INVOKER
	filesystem/dirmon/*.cpp
	filesystem/dirmon/*.h
)
source_group("Invoker\\dirmon" FILES ${DIRMON_INVOKER})
if (BUILD_AS_PLUGINS)
	add_library(
		invoker_dirmon SHARED 
		${DIRMON_INVOKER})
	target_link_libraries(invoker_dirmon uscxml)
	set_target_properties(invoker_dirmon PROPERTIES FOLDER "Plugin Invoker")
else()
	list (APPEND USCXML_FILES ${DIRMON_INVOKER})
endif()

# System invoker to open a native command

file(GLOB_RECURSE XHTML_INVOKER
	xhtml/*.cpp
	xhtml/*.h
)
source_group("Invoker\\xhtml" FILES ${XHTML_INVOKER})
if (BUILD_AS_PLUGINS)
	add_library(
		invoker_xhtml SHARED 
		${XHTML_INVOKER})
	target_link_libraries(invoker_xhtml uscxml)
	set_target_properties(invoker_xhtml PROPERTIES FOLDER "Plugin Invoker")
else()
	list (APPEND USCXML_FILES ${XHTML_INVOKER})
endif()


# System invoker to open a native command

file(GLOB_RECURSE SYSTEM_INVOKER
	system/*.cpp
	system/*.h
)
source_group("Invoker\\system" FILES ${SYSTEM_INVOKER})
if (BUILD_AS_PLUGINS)
	add_library(
		invoker_system SHARED 
		${SYSTEM_INVOKER})
	target_link_libraries(invoker_system uscxml)
	set_target_properties(invoker_system PROPERTIES FOLDER "Plugin Invoker")
else()
	list (APPEND USCXML_FILES ${SYSTEM_INVOKER})
endif()


# SQLite3 SQL Invoker

if (SQLITE3_FOUND)
	file(GLOB_RECURSE SQLITE3_INVOKER
		sqlite3/*.cpp
		sqlite3/*.h
	)
	source_group("Invoker\\sqlite" FILES ${SQLITE3_INVOKER})
	if (BUILD_AS_PLUGINS)
		add_library(
			invoker_sqlite3 SHARED 
			${SQLITE3_INVOKER})
		target_link_libraries(invoker_sqlite3 uscxml)
		set_target_properties(invoker_sqlite3 PROPERTIES FOLDER "Plugin Invoker")
	else()
		list (APPEND USCXML_FILES ${SQLITE3_INVOKER})
	endif()
endif()


# ffmpeg invoker

if (FFMPEG_FOUND)
	file(GLOB_RECURSE FFMPEG_INVOKER
		ffmpeg/*.cpp
		ffmpeg/*.h
	)
	source_group("Invoker\\ffmpeg" FILES ${FFMPEG_INVOKER})
	if (BUILD_AS_PLUGINS)
		add_library(
			invoker_ffmpeg SHARED 
			${FFMPEG_INVOKER})
		target_link_libraries(invoker_ffmpeg uscxml)
		set_target_properties(invoker_ffmpeg PROPERTIES FOLDER "Plugin Invoker")
	else()
		list (APPEND USCXML_FILES ${FFMPEG_INVOKER})
	endif()
endif()


# UMUNDO invoker 

if (UMUNDO_FOUND)
	file(GLOB_RECURSE UMUNDO_INVOKER 
		umundo/*.cpp 
		umundo/*.h)
	source_group("Invoker\\umundo" FILES ${UMUNDO_INVOKER})
	if (BUILD_AS_PLUGINS)
		add_library(
			invoker_umundo SHARED 
			${UMUNDO_INVOKER})
		target_link_libraries(invoker_umundo 
			uscxml
			${UMUNDO_LIBRARIES})
		set_target_properties(invoker_umundo PROPERTIES FOLDER "Plugin Invoker")
	else()
		list (APPEND USCXML_FILES ${UMUNDO_INVOKER})
	endif()
endif()


# USCXML invoker 

file(GLOB_RECURSE USCXML_INVOKER 
	scxml/*.cpp 
	scxml/*.h)
source_group("Invoker\\uscxml" FILES ${USCXML_INVOKER})
if (BUILD_AS_PLUGINS)
	add_library(
		invoker_uscxml SHARED 
		${USCXML_INVOKER})
	target_link_libraries(invoker_uscxml 
		uscxml)
		set_target_properties(invoker_uscxml PROPERTIES FOLDER "Plugin Invoker")
else()
	list (APPEND USCXML_FILES ${USCXML_INVOKER})
endif()


# HTTP server invoker 

file(GLOB_RECURSE HTTPSERVLET_INVOKER 
	http/*.cpp 
	http/*.h)
source_group("Invoker\\httpservlet" FILES ${HTTPSERVLET_INVOKER})
if (BUILD_AS_PLUGINS)
	add_library(
		invoker_httpserver SHARED 
		${HTTPSERVLET_INVOKER})
	target_link_libraries(invoker_httpserver 
		uscxml)
		set_target_properties(invoker_httpserver PROPERTIES FOLDER "Plugin Invoker")
else()
	list (APPEND USCXML_FILES ${HTTPSERVLET_INVOKER})
endif()


# Heartbeat invoker

file(GLOB_RECURSE HEARTBEAT_INVOKER
	heartbeat/*.cpp
	heartbeat/*.h
)
source_group("Invoker\\heartbeat" FILES ${HEARTBEAT_INVOKER})
if (BUILD_AS_PLUGINS)
	add_library(
		invoker_heartbeat SHARED 
		${HEARTBEAT_INVOKER})
	target_link_libraries(invoker_heartbeat uscxml)
	set_target_properties(invoker_heartbeat PROPERTIES FOLDER "Plugin Invoker")
else()
	list (APPEND USCXML_FILES ${HEARTBEAT_INVOKER})
endif()


# OpenSceneGraph invoker
if (OPENSCENEGRAPH_FOUND AND OPENGL_FOUND)	
	file(GLOB OPENSCENEGRAPH_INVOKER 
		graphics/openscenegraph/*.cpp 
		graphics/openscenegraph/*.h)
	source_group("Invoker\\scenegraph" FILES ${OPENSCENEGRAPH_INVOKER})

	if (BUILD_AS_PLUGINS)
		add_library(
			invoker_openscenegraph SHARED 
			${OPENSCENEGRAPH_INVOKER})
		target_link_libraries(invoker_openscenegraph
			${OPENSCENEGRAPH_LIBRARIES}
			${OPENGL_LIBRARIES}
			uscxml)
			set_target_properties(invoker_openscenegraph PROPERTIES FOLDER "Plugin Invoker")
	else()
		list (APPEND USCXML_FILES ${OPENSCENEGRAPH_INVOKER})
	endif()

	file(GLOB OPENSCENEGRAPH_CONVERTER_INVOKER 
		graphics/openscenegraph/converter/*.cpp 
		graphics/openscenegraph/converter/*.h)
	source_group("Invoker\\scenegraph\\convert" FILES ${OPENSCENEGRAPH_CONVERTER_INVOKER})

	if (BUILD_AS_PLUGINS)
		add_library(
			invoker_openscenegraph_convert SHARED 
			${OPENSCENEGRAPH_CONVERTER_INVOKER})
		target_link_libraries(invoker_openscenegraph_convert
			${OPENSCENEGRAPH_LIBRARIES}
			${OPENGL_LIBRARIES}
			uscxml)
			set_target_properties(invoker_openscenegraph_convert PROPERTIES FOLDER "Plugin Invoker")
	else()
		list (APPEND USCXML_FILES ${OPENSCENEGRAPH_CONVERTER_INVOKER})
	endif()

endif()


# MILES modality components

if (MILES_FOUND AND OFF)
	# openal is only needed for miles
	find_package(OpenAL REQUIRED)
#	find_package(JPEG REQUIRED)
	list (APPEND MILES_LIBRARIES "iconv")
	list (APPEND MILES_LIBRARIES ${JPEG_LIBRARIES})
	list (APPEND USCXML_INCLUDE_DIRS ${OPENAL_INCLUDE_DIR})

  file(GLOB_RECURSE MILES_INVOKER 
		miles/*.cpp 
		miles/*.h)
	source_group("Invoker\\miles" FILES ${MILES_INVOKER})
#	message("MILES_INVOKER ${MILES_INVOKER}")

	if (BUILD_AS_PLUGINS)
		add_library(
			invoker_miles SHARED 
			${MILES_INVOKER})
		target_link_libraries(invoker_miles 
			${MILES_LIBRARIES}
			${OPENAL_LIBRARY}
			uscxml)
		set_target_properties(invoker_miles PROPERTIES FOLDER "Plugin Invoker")
	else()
  	list (APPEND USCXML_FILES ${MILES_INVOKER})
	endif()
endif()

# VoiceXML modality components

if (UMUNDO_FOUND)
	file(GLOB_RECURSE VXML_INVOKER
		vxml/*.cpp
		vxml/*.h
	)
	source_group("Invoker\\voicexml" FILES ${VXML_INVOKER})
	if (BUILD_AS_PLUGINS)
		add_library(
			invoker_voicexml SHARED 
			${VXML_INVOKER})
		target_link_libraries(invoker_voicexml uscxml)
		set_target_properties(invoker_voicexml PROPERTIES FOLDER "Plugin Invoker")
	else()
		list (APPEND USCXML_FILES ${VXML_INVOKER})
	endif()
endif()

set(USCXML_INCLUDE_DIRS ${USCXML_INCLUDE_DIRS} PARENT_SCOPE)
set(USCXML_FILES ${USCXML_FILES} PARENT_SCOPE)