CMakeLists.txt 14.7 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
############################################################################
# CMakeLists.txt
# Copyright (C) 2014  Belledonne Communications, Grenoble France
#
############################################################################
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
#
############################################################################

23
if(MSVC AND NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsPhone" AND NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
24
	find_library(LIBGCC NAMES gcc)
25
	find_library(LIBMINGWEX NAMES mingwex)
26
endif()
Ghislain MARY's avatar
Ghislain MARY committed
27

28 29 30
find_program(AWK_PROGRAM awk)
if(NOT AWK_PROGRAM)
	message(FATAL_ERROR "You need the awk program to build mediastreamer2.")
31
endif()
32

33
set(BASE_SOURCE_FILES_C
34 35
	base/eventqueue.c
	base/mscommon.c
36
	base/msfactory.c
37 38 39 40
	base/msfilter.c
	base/msqueue.c
	base/mssndcard.c
	base/msticker.c
41
	base/msvideopresets.c
42 43 44 45 46 47 48 49
	base/mswebcam.c
	base/mtu.c
	otherfilters/itc.c
	otherfilters/join.c
	otherfilters/tee.c
	otherfilters/void.c
)

50
find_package(Git)
51 52 53 54
add_custom_target(ms2-git-version
	COMMAND ${CMAKE_COMMAND} -DGIT_EXECUTABLE=${GIT_EXECUTABLE} -DMEDIASTREAMER_VERSION=${MEDIASTREAMER_VERSION} -DWORK_DIR=${CMAKE_CURRENT_SOURCE_DIR} -DOUTPUT_DIR=${CMAKE_CURRENT_BINARY_DIR} -P ${CMAKE_CURRENT_SOURCE_DIR}/gitversion.cmake
	BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/gitversion.h"
)
55 56
add_custom_target(ms2-basedescs-header
	COMMAND ${CMAKE_COMMAND} -DAWK_PROGRAM=${AWK_PROGRAM} -DAWK_SCRIPTS_DIR="${CMAKE_CURRENT_SOURCE_DIR}/../"
57
		-DINPUT_DIR=${CMAKE_CURRENT_SOURCE_DIR} -DOUTPUT_DIR=${CMAKE_CURRENT_BINARY_DIR}
58
		-DTYPE=base -DSOURCE_FILES="${BASE_SOURCE_FILES_C}"
59 60
		-P "${CMAKE_CURRENT_SOURCE_DIR}/generate_descs_header.cmake"
	BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/basedescs.h")
61 62 63 64 65 66 67 68

add_definitions(
	-DMEDIASTREAMER2_EXPORTS
	-DMEDIASTREAMER2_INTERNAL_EXPORTS
	-D_TRUE_TIME
	-DMS2_INTERNAL
	-DMS2_FILTERS
)
69

70 71
set(BASE_LIBS
	${ORTP_LIBRARIES}
72
)
73
if(WIN32 AND NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsPhone" AND NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
74
	list(APPEND BASE_LIBS ${LIBGCC} ${LIBMINGWEX} ole32 oleaut32 uuid)
75 76 77 78
endif()
if(HAVE_DLOPEN)
	list(APPEND BASE_LIBS dl)
endif()
79

80 81
apply_compile_flags(BASE_SOURCE_FILES_C "CPP" "C")

82
if(ENABLE_STATIC)
83
	add_library(mediastreamer_base STATIC ${MEDIASTREAMER2_HEADER_FILES} ${BASE_SOURCE_FILES_C})
84
else()
85
	add_library(mediastreamer_base SHARED ${MEDIASTREAMER2_HEADER_FILES} ${BASE_SOURCE_FILES_C})
86
	set_target_properties(mediastreamer_base PROPERTIES VERSION ${MEDIASTREAMER_SO_VERSION} LINKER_LANGUAGE C)
87 88 89 90 91 92 93 94 95
	if(MSVC)
		if(CMAKE_BUILD_TYPE STREQUAL "Debug")
			install(FILES ${CMAKE_CURRENT_BINARY_DIR}/Debug/mediastreamer_base.pdb
				DESTINATION bin
				PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
			)
		endif()
	endif()
endif()
96
add_dependencies(mediastreamer_base ms2-git-version ms2-basedescs-header)
97
target_link_libraries(mediastreamer_base ${BASE_LIBS})
98

99
install(TARGETS mediastreamer_base EXPORT ${EXPORT_TARGETS_NAME}Targets
Ghislain MARY's avatar
Ghislain MARY committed
100 101 102
	RUNTIME DESTINATION bin
	LIBRARY DESTINATION lib
	ARCHIVE DESTINATION lib
103 104
	PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
105 106 107



108
set(VOIP_SOURCE_FILES_C
109 110 111
	audiofilters/alaw.c
	audiofilters/audiomixer.c
	audiofilters/chanadapt.c
112 113
	audiofilters/devices.c
	audiofilters/devices.h
114 115
	audiofilters/dtmfgen.c
	audiofilters/equalizer.c
116
	audiofilters/flowcontrol.c
117 118
	audiofilters/g711.c
	audiofilters/g711.h
johan's avatar
johan committed
119
	audiofilters/genericplc.h
120
	audiofilters/genericplc.c
johan's avatar
johan committed
121
	audiofilters/msgenericplc.c
122 123 124 125
	audiofilters/l16.c
	audiofilters/msfileplayer.c
	audiofilters/msfilerec.c
	audiofilters/msg722.c
126
	audiofilters/msvaddtx.c
127 128 129 130
	audiofilters/msvolume.c
	audiofilters/tonedetector.c
	audiofilters/ulaw.c
	audiofilters/waveheader.h
131
	crypto/dtls_srtp.c
132
	crypto/ms_srtp.c
133
	crypto/zrtp.c
134 135
	otherfilters/msrtp.c
	utils/_kiss_fft_guts.h
136
	utils/audiodiff.c
137 138 139 140 141 142 143 144
	utils/dsptools.c
	utils/g722.h
	utils/g722_decode.c
	utils/g722_encode.c
	utils/kiss_fft.c
	utils/kiss_fft.h
	utils/kiss_fftr.c
	utils/kiss_fftr.h
145
	utils/stream_regulator.c
146 147 148 149 150 151
	voip/audioconference.c
	voip/audiostream.c
	voip/bitratecontrol.c
	voip/bitratedriver.c
	voip/ice.c
	voip/mediastream.c
152
	voip/msmediaplayer.c
153 154 155
	voip/msvoip.c
	voip/private.h
	voip/qosanalyzer.c
156
	voip/qosanalyzer.h
157
	voip/qualityindicator.c
158 159
	otherfilters/rfc4103_source.c
	otherfilters/rfc4103_sink.c
160
	voip/rfc4103_textstream.c
161
	voip/ringstream.c
162
	voip/stun.c
163
	voip/stun_udp.c
164
)
165 166
set(VOIP_SOURCE_FILES_CXX )
set(VOIP_SOURCE_FILES_OBJC )
167

168
if(ENABLE_ALSA)
169
	list(APPEND VOIP_SOURCE_FILES_C audiofilters/alsa.c)
170 171
endif()
if(ENABLE_ARTSC)
172
	list(APPEND VOIP_SOURCE_FILES_C audiofilters/arts.c)
173 174
endif()
if(ENABLE_MACSND)
175
	list(APPEND VOIP_SOURCE_FILES_C audiofilters/macsnd.c)
176 177
endif()
if(ENABLE_MACAQSND)
178
	list(APPEND VOIP_SOURCE_FILES_C audiofilters/aqsnd.c)
179 180
endif()
if(ENABLE_OSS)
181
	list(APPEND VOIP_SOURCE_FILES_C audiofilters/oss.c)
182 183
endif()
if(ENABLE_PORTAUDIO)
184
	list(APPEND VOIP_SOURCE_FILES_C audiofilters/pasnd.c)
185 186
endif()
if(ENABLE_PULSEAUDIO)
187
	list(APPEND VOIP_SOURCE_FILES_C audiofilters/pulseaudio.c)
188 189
endif()
if(ENABLE_QSA)
190
	list(APPEND VOIP_SOURCE_FILES_C audiofilters/qsa.c)
191 192
endif()
if(IOS)
193 194
	list(APPEND VOIP_SOURCE_FILES_C audiofilters/aac-eld.c)
	list(APPEND VOIP_SOURCE_FILES_OBJC audiofilters/msiounit.m)
195
endif()
196
if(WIN32 AND NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsPhone" AND NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
197
	list(APPEND VOIP_SOURCE_FILES_C audiofilters/winsnd3.c)
198
endif()
199

200
if(GSM_FOUND)
201
	list(APPEND VOIP_SOURCE_FILES_C audiofilters/gsm.c)
202 203
endif()
if(OPUS_FOUND)
204
	list(APPEND VOIP_SOURCE_FILES_C audiofilters/msopus.c)
205 206
endif()
if(ENABLE_RESAMPLE)
207
	list(APPEND VOIP_SOURCE_FILES_C audiofilters/msresample.c)
208 209
endif()
if(SPEEX_FOUND)
210
	list(APPEND VOIP_SOURCE_FILES_C
211 212 213
		audiofilters/msspeex.c
		audiofilters/speexec.c
	)
214
endif()
215

216
if(ENABLE_VIDEO)
217
	list(APPEND VOIP_SOURCE_FILES_C
218
		utils/bits_rw.c
219 220
		videofilters/extdisplay.c
		videofilters/mire.c
221
		videofilters/nowebcam.c
222 223 224 225 226 227 228
		videofilters/pixconv.c
		videofilters/sizeconv.c
		voip/layouts.c
		voip/layouts.h
		voip/msvideo.c
		voip/msvideo_neon.c
		voip/msvideo_neon.h
229
		voip/nowebcam.h
230 231
		voip/rfc2429.h
		voip/rfc3984.c
Ghislain MARY's avatar
Ghislain MARY committed
232
		voip/videostarter.c
233
		voip/videostream.c
234
		voip/video_preset_high_fps.c
235
	)
236
	if(WIN32 AND NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsPhone" AND NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
237
		add_definitions(-DHAVE_DIRECTSHOW)
238
		list(APPEND VOIP_SOURCE_FILES_C
239 240
			videofilters/drawdib-display.c
		)
241
		list(APPEND VOIP_SOURCE_FILES_CXX
242
			videofilters/msdscap.cc
243
		)
244
	endif()
245
	if(APPLE)
246
		if(IOS)
247
			list(APPEND VOIP_SOURCE_FILES_C
248 249 250 251
				utils/opengles_display.c
				utils/opengles_display.h
				utils/shaders.c
				utils/shaders.h
252 253 254
				voip/scaler.c
			)
			list(APPEND VOIP_SOURCE_FILES_OBJC
255 256 257 258 259
				videofilters/iosdisplay.m
				videofilters/ioscapture.m
				voip/ioshardware.m
			)
		else()
260
			list(APPEND VOIP_SOURCE_FILES_OBJC
261 262 263
				videofilters/msosxdisplay.m
				videofilters/qtcapture.m
			)
264
			list(APPEND VOIP_SOURCE_FILES_C
265 266 267 268 269 270
				utils/opengles_display.c
				utils/opengles_display.h
				utils/shaders.c
				utils/shaders.h
			)
		endif()
271
	endif()
272
	if (ENABLE_QNX)
273 274 275 276 277
		list(APPEND VOIP_SOURCE_FILES_CXX
			videofilters/bb10_display.cpp
			videofilters/bb10_capture.cpp
		)
	endif()
278
	if(FFMPEG_FOUND)
279
		list(APPEND VOIP_SOURCE_FILES_C
280
			utils/ffmpeg-priv.c
281
			utils/ffmpeg-priv.h
282 283 284 285 286 287
			utils/swscale.h
			videofilters/h264dec.c
			videofilters/jpegwriter.c
			videofilters/videodec.c
			videofilters/videoenc.c
		)
288 289
	endif()
	if(GLX_FOUND)
290
		list(APPEND VOIP_SOURCE_FILES_C
291 292
			utils/opengles_display.c
			utils/shaders.c
293
			videofilters/glxvideo.c
294
		)
295 296
	endif()
	if(SDL_FOUND)
297
		list(APPEND VOIP_SOURCE_FILES_C videofilters/videoout.c)
298 299
	endif()
	if(THEORA_FOUND)
300
		list(APPEND VOIP_SOURCE_FILES_C videofilters/theora.c)
301
	endif()
302 303
	if(V4L_FOUND)
		if(HAVE_LINUX_VIDEODEV_H)
304
			list(APPEND VOIP_SOURCE_FILES_C videofilters/msv4l.c)
305 306
		endif()
		if(HAVE_LINUX_VIDEODEV2_H)
307
			list(APPEND VOIP_SOURCE_FILES_C videofilters/msv4l2.c)
308 309
		endif()
	endif()
310
	if(VPX_FOUND)
311
		list(APPEND VOIP_SOURCE_FILES_C
312 313 314 315 316
			videofilters/vp8.c
			voip/vp8rtpfmt.c
			voip/vp8rtpfmt.h
		)
	endif()
317
	if(MATROSKA2_FOUND)
318
		list(APPEND VOIP_SOURCE_FILES_C
319 320 321 322
			videofilters/mkv.c
			utils/mkv_reader.c
		)
	endif()
323
	if(X11_FOUND)
324
		list(APPEND VOIP_SOURCE_FILES_C utils/x11_helper.c)
325 326
	endif()
	if(XV_FOUND)
327
		list(APPEND VOIP_SOURCE_FILES_C videofilters/x11video.c)
328 329
	endif()
endif()
330

331
set(VOIP_SOURCE_FILES_ALL ${VOIP_SOURCE_FILES_C} ${VOIP_SOURCE_FILES_CXX} ${VOIP_SOURCE_FILES_OBJC})
332 333 334

add_custom_target(ms2-voipdescs-header
	COMMAND ${CMAKE_COMMAND} -DAWK_PROGRAM=${AWK_PROGRAM} -DAWK_SCRIPTS_DIR="${CMAKE_CURRENT_SOURCE_DIR}/../"
335
		-DINPUT_DIR=${CMAKE_CURRENT_SOURCE_DIR} -DOUTPUT_DIR=${CMAKE_CURRENT_BINARY_DIR}
336
		-DTYPE=voip -DSOURCE_FILES="${VOIP_SOURCE_FILES_ALL}"
337 338
		-P "${CMAKE_CURRENT_SOURCE_DIR}/generate_descs_header.cmake"
	BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/voipdescs.h"
339
)
340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363

if(APPLE OR GLX_FOUND)
	find_program(XXD_PROGRAM xxd)
	if(NOT XXD_PROGRAM)
		message(FATAL_ERROR "You need the xxd program to build mediastreamer2.")
	endif()
	find_program(SED_PROGRAM sed)
	if(NOT SED_PROGRAM)
		message(FATAL_ERROR "You need the sed program to build mediastreamer2.")
	endif()
	add_custom_target(ms2-yuv2rgb-fs-header
		COMMAND ${CMAKE_COMMAND} -DXXD_PROGRAM=${XXD_PROGRAM} -DSED_PROGRAM=${SED_PROGRAM}
			-DINPUT_DIR=${CMAKE_CURRENT_SOURCE_DIR} -DOUTPUT_DIR=${CMAKE_CURRENT_BINARY_DIR}
			-DSOURCE_FILE="yuv2rgb.fs"
			-P "${CMAKE_CURRENT_SOURCE_DIR}/generate_yuv2rgb_header.cmake"
		BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/yuv2rgb.fs.h"
	)
	add_custom_target(ms2-yuv2rgb-vs-header
		COMMAND ${CMAKE_COMMAND} -DXXD_PROGRAM=${XXD_PROGRAM} -DSED_PROGRAM=${SED_PROGRAM}
			-DINPUT_DIR=${CMAKE_CURRENT_SOURCE_DIR} -DOUTPUT_DIR=${CMAKE_CURRENT_BINARY_DIR}
			-DSOURCE_FILE="yuv2rgb.vs"
			-P "${CMAKE_CURRENT_SOURCE_DIR}/generate_yuv2rgb_header.cmake"
		BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/yuv2rgb.vs.h"
	)
364
endif()
365 366 367 368 369 370 371

apply_compile_flags(VOIP_SOURCE_FILES_C "CPP" "C")
apply_compile_flags(VOIP_SOURCE_FILES_OBJC "CPP" "OBJC")
if(VOIP_SOURCE_FILES_CXX)
	set_source_files_properties(${VOIP_SOURCE_FILES_CXX} PROPERTIES LANGUAGE CXX)
	apply_compile_flags(VOIP_SOURCE_FILES_CXX "CPP" "CXX")
endif()
372

373 374 375

set(VOIP_LIBS
	${ORTP_LIBRARIES}
Ghislain MARY's avatar
Ghislain MARY committed
376
	mediastreamer_base
377
)
378
if(WIN32)
379
	if(NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsPhone" AND NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
380
		list(APPEND VOIP_LIBS ${LIBGCC} ${LIBMINGWEX} ole32 oleaut32 uuid)
381
		if(ENABLE_VIDEO)
382
			list(APPEND VOIP_LIBS gdi32 strmiids user32 vfw32)
383
		endif()
384
	endif()
385 386 387 388
endif()
if(HAVE_DLOPEN)
	list(APPEND VOIP_LIBS dl)
endif()
389 390 391
if(PCAP_FOUND)
	list(APPEND VOIP_LIBS ${PCAP_LIBRARIES})
endif()
392 393 394
if(BZRTP_FOUND)
	list(APPEND VOIP_LIBS ${BZRTP_LIBRARIES})
endif()
395 396 397
if(SRTP_FOUND)
	list(APPEND VOIP_LIBS ${SRTP_LIBRARIES})
endif()
398 399 400
if(POLARSSL_FOUND)
	list(APPEND VOIP_LIBS ${POLARSSL_LIBRARIES})
endif()
401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423
if(GSM_FOUND)
	list(APPEND VOIP_LIBS ${GSM_LIBRARIES})
endif()
if(OPUS_FOUND)
	list(APPEND VOIP_LIBS ${OPUS_LIBRARIES})
endif()
if(SPEEX_FOUND)
	list(APPEND VOIP_LIBS ${SPEEX_LIBRARIES})
endif()
if(ALSA_FOUND)
	list(APPEND VOIP_LIBS ${ALSA_LIBRARIES})
endif()
if(ARTS_FOUND)
	list(APPEND VOIP_LIBS ${ARTS_LIBRARIES})
endif()
if(PORTAUDIO_FOUND)
	list(APPEND VOIP_LIBS ${PORTAUDIO_LIBRARIES})
endif()
if(PULSEAUDIO_FOUND)
	list(APPEND VOIP_LIBS ${PULSEAUDIO_LIBRARIES})
endif()
if(QSA_FOUND)
	list(APPEND VOIP_LIBS ${QSA_LIBRARIES})
424
	list(APPEND VOIP_LIBS ${QNXAUDIOMANAGER_LIBRARIES})
425 426 427 428 429 430 431
endif()
if(FFMPEG_FOUND)
	list(APPEND VOIP_LIBS ${FFMPEG_LIBRARIES})
	if(MSVC)
		add_definitions(-Dinline=__inline)
	endif()
endif()
432 433 434
if(V4L_FOUND)
	list(APPEND VOIP_LIBS ${V4L_LIBRARIES})
endif()
435 436 437 438 439 440 441 442 443 444 445 446
if(X11_FOUND)
	list(APPEND VOIP_LIBS ${X11_LIBRARIES})
endif()
if(XV_FOUND)
	list(APPEND VOIP_LIBS ${XV_LIBRARIES})
endif()
if(GLX_FOUND)
	list(APPEND VOIP_LIBS ${GLX_LIBRARIES})
endif()
if(VPX_FOUND)
	list(APPEND VOIP_LIBS ${VPX_LIBRARIES})
endif()
447 448
if(MATROSKA2_FOUND)
	list(APPEND VOIP_LIBS ${MATROSKA2_LIBRARIES})
449
endif()
450 451 452 453 454
if (SCREEN_FOUND)
	list(APPEND VOIP_LIBS ${SCREEN_LIBRARIES})
endif()
if (CAMAPI_FOUND)
	list(APPEND VOIP_LIBS ${CAMAPI_LIBRARIES})
455
endif()
456

457
if(ENABLE_STATIC)
458
	add_library(mediastreamer_voip STATIC ${MEDIASTREAMER2_HEADER_FILES} ${VOIP_SOURCE_FILES_C} ${VOIP_SOURCE_FILES_CXX} ${VOIP_SOURCE_FILES_OBJC})
459
else()
460
	add_library(mediastreamer_voip SHARED ${MEDIASTREAMER2_HEADER_FILES} ${VOIP_SOURCE_FILES_C} ${VOIP_SOURCE_FILES_CXX} ${VOIP_SOURCE_FILES_OBJC})
461
	set_target_properties(mediastreamer_voip PROPERTIES VERSION ${MEDIASTREAMER_SO_VERSION} LINKER_LANGUAGE CXX)
462 463 464 465 466 467 468 469 470
	if(MSVC)
		if(CMAKE_BUILD_TYPE STREQUAL "Debug")
			install(FILES ${CMAKE_CURRENT_BINARY_DIR}/Debug/mediastreamer_voip.pdb
				DESTINATION bin
				PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
			)
		endif()
	endif()
endif()
471 472 473 474
add_dependencies(mediastreamer_voip ms2-git-version ms2-voipdescs-header)
if(APPLE OR GLX_FOUND)
add_dependencies(mediastreamer_voip ms2-yuv2rgb-fs-header ms2-yuv2rgb-vs-header)
endif()
475
target_link_libraries(mediastreamer_voip ${VOIP_LIBS})
476
string(REPLACE ";" " " LINK_FLAGS_STR "${LINK_FLAGS}")
Ghislain MARY's avatar
Ghislain MARY committed
477
if(LINK_FLAGS_STR)
478
	set_target_properties(mediastreamer_voip PROPERTIES LINK_FLAGS "${LINK_FLAGS_STR}")
479
endif()
480

481
install(TARGETS mediastreamer_voip EXPORT ${EXPORT_TARGETS_NAME}Targets
Ghislain MARY's avatar
Ghislain MARY committed
482 483 484
	RUNTIME DESTINATION bin
	LIBRARY DESTINATION lib
	ARCHIVE DESTINATION lib
485 486
	PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
487 488 489 490 491 492

if(ENABLE_VIDEO)
	install(FILES voip/nowebcamCIF.jpg
		DESTINATION ${PACKAGE_DATA_DIR}/images
        PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
	)
493
endif()
494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514


if(ENABLE_VIDEO AND CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
	add_library(mswinrtjpeg2yuv MODULE "videofilters/winrtjpeg2yuv.cpp")
	set_target_properties(mswinrtjpeg2yuv PROPERTIES LINKER_LANGUAGE CXX VS_WINRT_COMPONENT TRUE)
	target_link_libraries(mswinrtjpeg2yuv mediastreamer_voip)

	install(TARGETS mswinrtjpeg2yuv
		RUNTIME DESTINATION bin
		LIBRARY DESTINATION lib
		ARCHIVE DESTINATION lib
		PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
	)

	if(CMAKE_BUILD_TYPE STREQUAL "Debug")
		install(FILES ${CMAKE_CURRENT_BINARY_DIR}/Debug/mswinrtjpeg2yuv.pdb
			DESTINATION bin
			PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
		)
	endif()
endif()