ms2.cmake 3.05 KB
Newer Older
1 2
############################################################################
# ms2.cmake
3
# Copyright (C) 2014-2018  Belledonne Communications, Grenoble France
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#
############################################################################
#
# 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
19
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
20 21 22
#
############################################################################

23
lcb_git_repository("https://gitlab.linphone.org/BC/public/mediastreamer2.git")
24 25
lcb_git_tag_latest("master")
lcb_git_tag("2.14.0")
26
lcb_external_source_paths("mediastreamer2")
27
lcb_groupable(YES)
28
lcb_sanitizable(YES)
29
lcb_package_source(YES)
30 31
lcb_spec_file("mediastreamer2.spec")
lcb_rpmbuild_name("mediastreamer")
Ghislain MARY's avatar
Ghislain MARY committed
32

33
lcb_dependencies("ortp" "bctoolbox")
34
if(ANDROID)
35
	lcb_dependencies("androidcpufeatures" "androidsupport")
36
endif()
Ghislain MARY's avatar
Ghislain MARY committed
37

38
lcb_cmake_options(
Ghislain MARY's avatar
Ghislain MARY committed
39 40 41
	"-DENABLE_NON_FREE_CODECS=${ENABLE_NON_FREE_CODECS}"
	"-DENABLE_UNIT_TESTS=${ENABLE_UNIT_TESTS}"
	"-DENABLE_DEBUG_LOGS=${ENABLE_DEBUG_LOGS}"
42
	"-DENABLE_PCAP=${ENABLE_PCAP}"
43 44
	"-DENABLE_DOC=${ENABLE_DOC}"
	"-DENABLE_TOOLS=${ENABLE_TOOLS}"
Ghislain MARY's avatar
Ghislain MARY committed
45 46
)

47 48 49 50 51 52
lcb_cmake_options(
	"-DENABLE_G726=${ENABLE_G726}"
	"-DENABLE_GSM=${ENABLE_GSM}"
	"-DENABLE_OPUS=${ENABLE_OPUS}"
	"-DENABLE_SPEEX_CODEC=${ENABLE_SPEEX}"
	"-DENABLE_BV16=${ENABLE_BV16}"
53
	"-DENABLE_G729=${ENABLE_G729}"
54
	"-DENABLE_G729B_CNG=${ENABLE_G729B_CNG}"
Erwan Croze's avatar
Erwan Croze committed
55
	"-DENABLE_JPEG=${ENABLE_JPEG}"
56
	"-DENABLE_QRCODE=${ENABLE_QRCODE}"
57
)
58
if(ENABLE_GSM)
59
	lcb_dependencies("gsm")
60
endif()
61
if(ENABLE_OPUS)
62
	lcb_dependencies("opus")
63
endif()
64
if(ENABLE_SPEEX)
65
	lcb_dependencies("speex")
66
endif()
67
if(ENABLE_BV16)
68 69
	lcb_dependencies("bv16")
endif()
70 71
if(ENABLE_G729 OR ENABLE_G729B_CNG)
	lcb_dependencies("bcg729")
72
endif()
Erwan Croze's avatar
Erwan Croze committed
73 74 75
if(ENABLE_JPEG)
	lcb_dependencies("turbo-jpeg")
endif()
76 77 78
if(ENABLE_QRCODE)
	lcb_dependencies("zxing")
endif()
Ghislain MARY's avatar
Ghislain MARY committed
79

80
lcb_cmake_options("-DENABLE_VIDEO=${ENABLE_VIDEO}")
81
if(ENABLE_VIDEO)
82 83 84 85
	lcb_cmake_options(
		"-DENABLE_FFMPEG=${ENABLE_FFMPEG}"
		"-DENABLE_VPX=${ENABLE_VPX}"
	)
86
	if(ENABLE_FFMPEG)
87
		if(ANDROID)
88
			lcb_dependencies("ffmpegandroid")
89
		else()
90
			lcb_dependencies("ffmpeg")
91
		endif()
Ghislain MARY's avatar
Ghislain MARY committed
92
	endif()
93
	if(ENABLE_VPX)
94
		lcb_dependencies("vpx")
95
	endif()
96
endif()
97 98 99
if(ENABLE_GTK_UI)
	lcb_cmake_options("-DENABLE_GL=NO")
endif()
Ghislain MARY's avatar
Ghislain MARY committed
100

101
lcb_cmake_options("-DENABLE_MKV=${ENABLE_MKV}")
102
if(ENABLE_MKV)
103
	lcb_dependencies("matroska2")
104 105
endif()

106 107 108 109
lcb_cmake_options(
	"-DENABLE_SRTP=${ENABLE_SRTP}"
	"-DENABLE_ZRTP=${ENABLE_ZRTP}"
)
110
if(ENABLE_SRTP)
111
	lcb_dependencies("srtp")
Ghislain MARY's avatar
Ghislain MARY committed
112
endif()
113
if(ENABLE_ZRTP)
114
	lcb_dependencies("bzrtp")
115
endif()
116