ms2.cmake 3.33 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
############################################################################
# ms2.cmake
# 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.
#
############################################################################

Ghislain MARY's avatar
Ghislain MARY committed
23
set(EP_ms2_GIT_REPOSITORY "git://git.linphone.org/mediastreamer2.git")
24
set(EP_ms2_GIT_TAG_LATEST "master")
25
set(EP_ms2_GIT_TAG "2.11.2")
26
set(EP_ms2_EXTERNAL_SOURCE_PATHS "ms2" "mediastreamer2" "linphone/mediastreamer2")
Ghislain MARY's avatar
Ghislain MARY committed
27

28 29 30 31 32
set(EP_ms2_CMAKE_OPTIONS )
set(EP_ms2_LINKING_TYPE "-DENABLE_STATIC=NO")
set(EP_ms2_DEPENDENCIES EP_ortp)
if(ENABLE_GSM)
	list(APPEND EP_ms2_CMAKE_OPTIONS "-DENABLE_GSM=YES")
33 34 35
	if(LINPHONE_BUILDER_BUILD_DEPENDENCIES)
		list(APPEND EP_ms2_DEPENDENCIES EP_gsm)
	endif()
36
else()
37 38 39 40
	list(APPEND EP_ms2_CMAKE_OPTIONS "-DENABLE_GSM=NO")
endif()
if(ENABLE_OPUS)
	list(APPEND EP_ms2_CMAKE_OPTIONS "-DENABLE_OPUS=YES")
41 42 43
	if(LINPHONE_BUILDER_BUILD_DEPENDENCIES)
		list(APPEND EP_ms2_DEPENDENCIES EP_opus)
	endif()
44 45 46 47 48
else()
	list(APPEND EP_ms2_CMAKE_OPTIONS "-DENABLE_OPUS=NO")
endif()
if(ENABLE_SPEEX)
	list(APPEND EP_ms2_CMAKE_OPTIONS "-DENABLE_SPEEX=YES")
49 50 51
	if(LINPHONE_BUILDER_BUILD_DEPENDENCIES)
		list(APPEND EP_ms2_DEPENDENCIES EP_speex)
	endif()
52 53 54 55 56
else()
	list(APPEND EP_ms2_CMAKE_OPTIONS "-DENABLE_SPEEX=NO")
endif()
if(ENABLE_VIDEO)
	list(APPEND EP_ms2_CMAKE_OPTIONS "-DENABLE_VIDEO=YES")
57
	if(ENABLE_FFMPEG)
58
		list(APPEND EP_ms2_CMAKE_OPTIONS "-DENABLE_FFMPEG=YES")
59 60 61
		if(LINPHONE_BUILDER_BUILD_DEPENDENCIES)
			list(APPEND EP_ms2_DEPENDENCIES EP_ffmpeg)
		endif()
Ghislain MARY's avatar
Ghislain MARY committed
62
	else()
63
		list(APPEND EP_ms2_CMAKE_OPTIONS "-DENABLE_FFMPEG=NO")
Ghislain MARY's avatar
Ghislain MARY committed
64
	endif()
65
	if(ENABLE_VPX)
66
		list(APPEND EP_ms2_CMAKE_OPTIONS "-DENABLE_VPX=YES")
67 68 69
		if(LINPHONE_BUILDER_BUILD_DEPENDENCIES)
			list(APPEND EP_ms2_DEPENDENCIES EP_vpx)
		endif()
Ghislain MARY's avatar
Ghislain MARY committed
70
	else()
71
		list(APPEND EP_ms2_CMAKE_OPTIONS "-DENABLE_VPX=NO")
Ghislain MARY's avatar
Ghislain MARY committed
72
	endif()
73 74 75
else()
	list(APPEND EP_ms2_CMAKE_OPTIONS "-DENABLE_VIDEO=NO")
endif()
76
if(ENABLE_SRTP)
77
	list(APPEND EP_ms2_CMAKE_OPTIONS "-DENABLE_SRTP=YES")
78 79 80
	if(LINPHONE_BUILDER_BUILD_DEPENDENCIES)
		list(APPEND EP_ms2_DEPENDENCIES EP_srtp)
	endif()
81
else()
82
	list(APPEND EP_ms2_CMAKE_OPTIONS "-DENABLE_SRTP=NO")
83 84
endif()
if(ENABLE_ZRTP)
85
	list(APPEND EP_ms2_CMAKE_OPTIONS "-DENABLE_ZRTP=YES")
86 87
	list(APPEND EP_ms2_DEPENDENCIES EP_bzrtp)
else()
88
	list(APPEND EP_ms2_CMAKE_OPTIONS "-DENABLE_ZRTP=NO")
89
endif()
90 91 92 93 94
if(ENABLE_UNIT_TESTS)
	list(APPEND EP_ms2_CMAKE_OPTIONS "-DENABLE_UNIT_TESTS=YES")
else()
	list(APPEND EP_ms2_CMAKE_OPTIONS "-DENABLE_UNIT_TESTS=NO")
endif()
95
if(ENABLE_V4L AND LINPHONE_BUILDER_BUILD_DEPENDENCIES)
96 97
	list(APPEND EP_ms2_DEPENDENCIES EP_v4l)
endif()
98 99
if(MSVC)
	set(EP_ms2_EXTRA_LDFLAGS "/SAFESEH:NO")
100
endif()