ms2.cmake 2.93 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")
Ghislain MARY's avatar
Ghislain MARY committed
25
set(EP_ms2_GIT_TAG "ebbd1094ef448322c5145fc662d441882735a86f")
Ghislain MARY's avatar
Ghislain MARY committed
26

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