ms2.cmake 3.27 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 "cb24d6f8fad1f540f65d91cdefedd791109952e1")
Ghislain MARY's avatar
Ghislain MARY committed
26

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