Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
linphone-cmake-builder
Commits
8d78f930
Commit
8d78f930
authored
Feb 17, 2014
by
Ghislain MARY
Browse files
Add build options for unit tests and start handling the build options.
parent
74fa7a3b
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
148 additions
and
55 deletions
+148
-55
CMakeLists.txt
CMakeLists.txt
+1
-28
cmake/LinphoneBuilderOptions.cmake
cmake/LinphoneBuilderOptions.cmake
+47
-0
configs/config-bb10.cmake
configs/config-bb10.cmake
+8
-2
configs/config-default.cmake
configs/config-default.cmake
+68
-25
configs/config-desktop.cmake
configs/config-desktop.cmake
+24
-0
No files found.
CMakeLists.txt
View file @
8d78f930
...
...
@@ -29,42 +29,15 @@ set(LINPHONE_BUILDER_TOOLCHAIN "desktop" CACHE STRING "Toolchain to use for the
include
(
cmake/LinphoneCMakeBuilder.cmake
)
# Include toolchain definition
if needed
# Include toolchain definition
message
(
"-- Using toolchain '
${
LINPHONE_BUILDER_TOOLCHAIN
}
'"
)
include
(
toolchains/toolchain-
${
LINPHONE_BUILDER_TOOLCHAIN
}
.cmake
)
linphone_builder_apply_toolchain_flags
()
# Include project configuration according to the toolchain
include
(
configs/config-default.cmake
)
include
(
configs/config-
${
LINPHONE_BUILDER_TOOLCHAIN
}
.cmake
)
# Define the build options
include
(
CMakeDependentOption
)
option
(
ENABLE_VIDEO
"Enable video support."
${
DEFAULT_VALUE_ENABLE_VIDEO
}
)
option
(
ENABLE_GPL_THIRD_PARTIES
"Enable GPL third-parties (ffmpeg and ZRTP)."
${
DEFAULT_VALUE_ENABLE_GPL_THIRD_PARTIES
}
)
cmake_dependent_option
(
ENABLE_FFMPEG
"Enable ffmpeg support."
${
DEFAULT_VALUE_ENABLE_FFMPEG
}
"ENABLE_VIDEO;ENABLE_GPL_THIRD_PARTIES"
OFF
)
cmake_dependent_option
(
ENABLE_ZRTP
"Enable ZRTP support."
${
DEFAULT_VALUE_ENABLE_ZRTP
}
"ENABLE_GPL_THIRD_PARTIES"
OFF
)
option
(
ENABLE_SRTP
"Enable SRTP support."
${
DEFAULT_VALUE_ENABLE_SRTP
}
)
option
(
ENABLE_AMR
"Enable AMR audio codec support."
${
DEFAULT_VALUE_ENABLE_AMR
}
)
option
(
ENABLE_G729
"Enable G.729 audio codec support."
${
DEFAULT_VALUE_ENABLE_G729
}
)
option
(
ENABLE_GSM
"Enable GSM audio codec support."
${
DEFAULT_VALUE_ENABLE_GSM
}
)
option
(
ENABLE_ILBC
"Enable iLBC audio codec support."
${
DEFAULT_VALUE_ENABLE_ILBC
}
)
option
(
ENABLE_ISAC
"Enable ISAC audio codec support."
${
DEFAULT_VALUE_ENABLE_ISAC
}
)
option
(
ENABLE_OPUS
"Enable OPUS audio codec support."
${
DEFAULT_VALUE_ENABLE_OPUS
}
)
option
(
ENABLE_SILK
"Enable SILK audio codec support."
${
DEFAULT_VALUE_ENABLE_SILK
}
)
option
(
ENABLE_SPEEX
"Enable speex audio codec support."
${
DEFAULT_VALUE_ENABLE_SPEEX
}
)
cmake_dependent_option
(
ENABLE_VPX
"Enable VPX video codec support."
${
DEFAULT_VALUE_ENABLE_VPX
}
"ENABLE_VIDEO"
OFF
)
cmake_dependent_option
(
ENABLE_X264
"Enable H.264 audio encoder support with the x264 library."
${
DEFAULT_VALUE_ENABLE_X264
}
"ENABLE_VIDEO"
OFF
)
option
(
ENABLE_TUNNEL
"Enable tunnel support."
${
DEFAULT_VALUE_ENABLE_TUNNEL
}
)
# Include builders definitions
include
(
builders/CMakeLists.txt
)
cmake/LinphoneBuilderOptions.cmake
0 → 100644
View file @
8d78f930
############################################################################
# LinphoneBuilderOptions.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.
#
############################################################################
# Define the build options
include
(
CMakeDependentOption
)
option
(
ENABLE_VIDEO
"Enable video support."
${
DEFAULT_VALUE_ENABLE_VIDEO
}
)
option
(
ENABLE_GPL_THIRD_PARTIES
"Enable GPL third-parties (ffmpeg and ZRTP)."
${
DEFAULT_VALUE_ENABLE_GPL_THIRD_PARTIES
}
)
cmake_dependent_option
(
ENABLE_FFMPEG
"Enable ffmpeg support."
${
DEFAULT_VALUE_ENABLE_FFMPEG
}
"ENABLE_VIDEO;ENABLE_GPL_THIRD_PARTIES"
OFF
)
cmake_dependent_option
(
ENABLE_ZRTP
"Enable ZRTP support."
${
DEFAULT_VALUE_ENABLE_ZRTP
}
"ENABLE_GPL_THIRD_PARTIES"
OFF
)
option
(
ENABLE_SRTP
"Enable SRTP support."
${
DEFAULT_VALUE_ENABLE_SRTP
}
)
option
(
ENABLE_AMR
"Enable AMR audio codec support."
${
DEFAULT_VALUE_ENABLE_AMR
}
)
option
(
ENABLE_G729
"Enable G.729 audio codec support."
${
DEFAULT_VALUE_ENABLE_G729
}
)
option
(
ENABLE_GSM
"Enable GSM audio codec support."
${
DEFAULT_VALUE_ENABLE_GSM
}
)
option
(
ENABLE_ILBC
"Enable iLBC audio codec support."
${
DEFAULT_VALUE_ENABLE_ILBC
}
)
option
(
ENABLE_ISAC
"Enable ISAC audio codec support."
${
DEFAULT_VALUE_ENABLE_ISAC
}
)
option
(
ENABLE_OPUS
"Enable OPUS audio codec support."
${
DEFAULT_VALUE_ENABLE_OPUS
}
)
option
(
ENABLE_SILK
"Enable SILK audio codec support."
${
DEFAULT_VALUE_ENABLE_SILK
}
)
option
(
ENABLE_SPEEX
"Enable speex audio codec support."
${
DEFAULT_VALUE_ENABLE_SPEEX
}
)
cmake_dependent_option
(
ENABLE_VPX
"Enable VPX video codec support."
${
DEFAULT_VALUE_ENABLE_VPX
}
"ENABLE_VIDEO"
OFF
)
cmake_dependent_option
(
ENABLE_X264
"Enable H.264 audio encoder support with the x264 library."
${
DEFAULT_VALUE_ENABLE_X264
}
"ENABLE_VIDEO"
OFF
)
option
(
ENABLE_TUNNEL
"Enable tunnel support."
${
DEFAULT_VALUE_ENABLE_TUNNEL
}
)
option
(
ENABLE_UNIT_TESTS
"Enable unit tests support with CUnit library."
${
DEFAULT_VALUE_ENABLE_UNIT_TESTS
}
)
configs/config-bb10.cmake
View file @
8d78f930
...
...
@@ -20,6 +20,7 @@
#
############################################################################
# Define default values for the linphone builder options
set
(
DEFAULT_VALUE_ENABLE_VIDEO OFF
)
set
(
DEFAULT_VALUE_ENABLE_GPL_THIRD_PARTIES ON
)
set
(
DEFAULT_VALUE_ENABLE_FFMPEG OFF
)
...
...
@@ -36,11 +37,16 @@ set(DEFAULT_VALUE_ENABLE_SPEEX ON)
set
(
DEFAULT_VALUE_ENABLE_VPX OFF
)
set
(
DEFAULT_VALUE_ENABLE_X264 OFF
)
set
(
DEFAULT_VALUE_ENABLE_TUNNEL OFF
)
set
(
DEFAULT_VALUE_ENABLE_UNIT_TESTS ON
)
# Include default configuration
include
(
configs/config-default.cmake
)
set
(
AUTOTOOLS_SHARED_LIBRARIES
"--disable-static --enable-shared"
)
set
(
CMAKE_SHARED_LIBRARIES
"-DENABLE_STATIC=0"
)
# cunit
set
(
EP_cunit_CMAKE_OPTIONS
"
${
CMAKE_SHARED_LIBRARIES
}
${
EP_cunit_CMAKE_OPTIONS
}
"
)
...
...
@@ -67,10 +73,10 @@ set(EP_speex_CMAKE_OPTIONS "${CMAKE_SHARED_LIBRARIES} ${EP_speex_CMAKE_OPTIONS}"
set
(
EP_opus_CONFIGURE_OPTIONS
"
${
AUTOTOOLS_SHARED_LIBRARIES
}
${
EP_opus_CONFIGURE_OPTIONS
}
--enable-fixed-point --disable-asm"
)
# oRTP
set
(
EP_ortp_CONFIGURE_OPTIONS
"
${
AUTOTOOLS_SHARED_LIBRARIES
}
${
EP_ortp_CONFIGURE_OPTIONS
}
--disable-zrtp --enable-broken-srtp
"
)
set
(
EP_ortp_CONFIGURE_OPTIONS
"
${
AUTOTOOLS_SHARED_LIBRARIES
}
${
EP_ortp_CONFIGURE_OPTIONS
}
"
)
# mediastreamer2
set
(
EP_ms2_CONFIGURE_OPTIONS
"
${
AUTOTOOLS_SHARED_LIBRARIES
}
${
EP_ms2_CONFIGURE_OPTIONS
}
--disable-nls --disable-theora --disable-sdl --disable-x11 --disable-video --disable-alsa --enable-qsa --enable-relativeprefix=yes"
)
# linphone
set
(
EP_linphone_CONFIGURE_OPTIONS
"
${
AUTOTOOLS_SHARED_LIBRARIES
}
${
EP_linphone_CONFIGURE_OPTIONS
}
--disable-nls --with-readline=none --enable-gtk_ui=no --enable-console_ui=no --disable-x11 --disable-tutorials --disable-tools --disable-msg-storage --disable-video
--disable-zrtp
--disable-alsa --enable-relativeprefix=yes"
)
set
(
EP_linphone_CONFIGURE_OPTIONS
"
${
AUTOTOOLS_SHARED_LIBRARIES
}
${
EP_linphone_CONFIGURE_OPTIONS
}
--disable-nls --with-readline=none --enable-gtk_ui=no --enable-console_ui=no --disable-x11 --disable-tutorials --disable-tools --disable-msg-storage --disable-video --disable-alsa --enable-relativeprefix=yes"
)
configs/config-default.cmake
View file @
8d78f930
...
...
@@ -20,35 +20,33 @@
#
############################################################################
set
(
DEFAULT_VALUE_ENABLE_VIDEO ON
)
set
(
DEFAULT_VALUE_ENABLE_GPL_THIRD_PARTIES ON
)
set
(
DEFAULT_VALUE_ENABLE_FFMPEG ON
)
set
(
DEFAULT_VALUE_ENABLE_ZRTP ON
)
set
(
DEFAULT_VALUE_ENABLE_SRTP ON
)
set
(
DEFAULT_VALUE_ENABLE_AMR ON
)
set
(
DEFAULT_VALUE_ENABLE_G729 ON
)
set
(
DEFAULT_VALUE_ENABLE_GSM ON
)
set
(
DEFAULT_VALUE_ENABLE_ILBC ON
)
set
(
DEFAULT_VALUE_ENABLE_ISAC ON
)
set
(
DEFAULT_VALUE_ENABLE_OPUS ON
)
set
(
DEFAULT_VALUE_ENABLE_SILK ON
)
set
(
DEFAULT_VALUE_ENABLE_SPEEX ON
)
set
(
DEFAULT_VALUE_ENABLE_VPX ON
)
set
(
DEFAULT_VALUE_ENABLE_X264 ON
)
set
(
DEFAULT_VALUE_ENABLE_TUNNEL OFF
)
# Include linphone builder options definitions
include
(
cmake/LinphoneBuilderOptions.cmake
)
# List of the projects to build. The order is important and must follow the dependencies.
set
(
LINPHONE_BUILDER_BUILDERS
cunit
set
(
LINPHONE_BUILDER_BUILDERS
)
if
(
${
ENABLE_UNIT_TESTS
}
)
list
(
APPEND LINPHONE_BUILDER_BUILDERS cunit
)
endif
(
${
ENABLE_UNIT_TESTS
}
)
if
(
${
ENABLE_SRTP
}
)
list
(
APPEND LINPHONE_BUILDER_BUILDERS srtp
)
endif
(
${
ENABLE_SRTP
}
)
if
(
${
ENABLE_GSM
}
)
list
(
APPEND LINPHONE_BUILDER_BUILDERS gsm
)
endif
(
${
ENABLE_GSM
}
)
if
(
${
ENABLE_OPUS
}
)
list
(
APPEND LINPHONE_BUILDER_BUILDERS opus
)
endif
(
${
ENABLE_OPUS
}
)
if
(
${
ENABLE_SPEEX
}
)
list
(
APPEND LINPHONE_BUILDER_BUILDERS speex
)
endif
(
${
ENABLE_SPEEX
}
)
list
(
APPEND LINPHONE_BUILDER_BUILDERS
xml2
antlr3c
polarssl
bellesip
srtp
gsm
speex
opus
ortp
ms2
linphone
...
...
@@ -77,7 +75,12 @@ set(EP_polarssl_GIT_TAG "linphone")
# belle-sip
set
(
EP_bellesip_GIT_REPOSITORY
"git://git.linphone.org/belle-sip.git"
)
set
(
EP_bellesip_GIT_TAG
"master"
)
set
(
EP_bellesip_DEPENDENCIES EP_antlr3c EP_cunit EP_polarssl
)
set
(
EP_bellesip_DEPENDENCIES EP_antlr3c EP_polarssl
)
if
(
${
ENABLE_UNIT_TESTS
}
)
list
(
APPEND EP_bellesip_DEPENDENCIES EP_cunit
)
else
(
${
ENABLE_UNIT_TESTS
}
)
set
(
EP_bellesip_CMAKE_OPTIONS
"
${
EP_bellesip_CMAKE_OPTIONS
}
-DENABLE_TESTS=0"
)
endif
(
${
ENABLE_UNIT_TESTS
}
)
# srtp
set
(
EP_srtp_GIT_REPOSITORY
"git://git.linphone.org/srtp.git"
)
...
...
@@ -101,16 +104,56 @@ set(EP_opus_CONFIGURE_OPTIONS "--disable-extra-programs --disable-doc")
set
(
EP_ortp_GIT_REPOSITORY
"git://git.linphone.org/ortp.git"
)
set
(
EP_ortp_GIT_TAG
"master"
)
set
(
EP_ortp_CONFIGURE_OPTIONS
"--disable-strict"
)
set
(
EP_ortp_DEPENDENCIES EP_srtp
)
set
(
EP_ortp_DEPENDENCIES
)
if
(
${
ENABLE_SRTP
}
)
set
(
EP_ortp_CONFIGURE_OPTIONS
"
${
EP_ortp_CONFIGURE_OPTIONS
}
--with-srtp=
${
CMAKE_INSTALL_PREFIX
}
"
)
list
(
APPEND EP_ortp_DEPENDENCIES EP_srtp
)
endif
(
${
ENABLE_SRTP
}
)
if
(
${
ENABLE_ZRTP
}
)
# TODO
else
(
${
ENABLE_ZRTP
}
)
set
(
EP_ortp_CONFIGURE_OPTIONS
"
${
EP_ortp_CONFIGURE_OPTIONS
}
--disable-zrtp"
)
endif
(
${
ENABLE_ZRTP
}
)
# mediastreamer2
set
(
EP_ms2_GIT_REPOSITORY
"git://git.linphone.org/mediastreamer2.git"
)
set
(
EP_ms2_GIT_TAG
"master"
)
set
(
EP_ms2_CONFIGURE_OPTIONS
"--disable-strict --enable-external-ortp"
)
set
(
EP_ms2_DEPENDENCIES EP_ortp EP_gsm EP_speex EP_opus
)
set
(
EP_ms2_DEPENDENCIES EP_ortp
)
if
(
${
ENABLE_GSM
}
)
set
(
EP_ms2_CONFIGURE_OPTIONS
"
${
EP_ms2_CONFIGURE_OPTIONS
}
--with-gsm=
${
CMAKE_INSTALL_PREFIX
}
"
)
list
(
APPEND EP_ms2_DEPENDENCIES EP_gsm
)
else
(
${
ENABLE_GSM
}
)
set
(
EP_ms2_CONFIGURE_OPTIONS
"
${
EP_ms2_CONFIGURE_OPTIONS
}
--disable-gsm"
)
endif
(
${
ENABLE_GSM
}
)
if
(
${
ENABLE_OPUS
}
)
list
(
APPEND EP_ms2_DEPENDENCIES EP_opus
)
else
(
${
ENABLE_OPUS
}
)
set
(
EP_ms2_CONFIGURE_OPTIONS
"
${
EP_ms2_CONFIGURE_OPTIONS
}
--disable-opus"
)
endif
(
${
ENABLE_OPUS
}
)
if
(
${
ENABLE_SPEEX
}
)
list
(
APPEND EP_ms2_DEPENDENCIES EP_speex
)
else
(
${
ENABLE_SPEEX
}
)
set
(
EP_ms2_CONFIGURE_OPTIONS
"
${
EP_ms2_CONFIGURE_OPTIONS
}
--disable-speex"
)
endif
(
${
ENABLE_SPEEX
}
)
if
(
${
ENABLE_UNIT_TESTS
}
)
list
(
APPEND EP_ms2_DEPENDENCIES EP_cunit
)
else
(
${
ENABLE_UNIT_TESTS
}
)
set
(
EP_ms2_CONFIGURE_OPTIONS
"
${
EP_ms2_CONFIGURE_OPTIONS
}
--disable-tests"
)
endif
(
${
ENABLE_UNIT_TESTS
}
)
# linphone
set
(
EP_linphone_GIT_REPOSITORY
"git://git.linphone.org/linphone.git"
)
set
(
EP_linphone_GIT_TAG
"master"
)
set
(
EP_linphone_CONFIGURE_OPTIONS
"--disable-strict --enable-bellesip --enable-external-ortp --enable-external-mediastreamer"
)
set
(
EP_linphone_DEPENDENCIES EP_bellesip EP_ortp EP_ms2 EP_xml2
)
if
(
${
ENABLE_ZRTP
}
)
# TODO
else
(
${
ENABLE_ZRTP
}
)
set
(
EP_linphone_CONFIGURE_OPTIONS
"
${
EP_linphone_CONFIGURE_OPTIONS
}
--disable-zrtp"
)
endif
(
${
ENABLE_ZRTP
}
)
if
(
${
ENABLE_UNIT_TESTS
}
)
list
(
APPEND EP_linphone_DEPENDENCIES EP_cunit
)
else
(
${
ENABLE_UNIT_TESTS
}
)
set
(
EP_linphone_CONFIGURE_OPTIONS
"
${
EP_linphone_CONFIGURE_OPTIONS
}
--disable-tests"
)
endif
(
${
ENABLE_UNIT_TESTS
}
)
configs/config-desktop.cmake
View file @
8d78f930
...
...
@@ -20,9 +20,33 @@
#
############################################################################
# Define default values for the linphone builder options
set
(
DEFAULT_VALUE_ENABLE_VIDEO ON
)
set
(
DEFAULT_VALUE_ENABLE_GPL_THIRD_PARTIES ON
)
set
(
DEFAULT_VALUE_ENABLE_FFMPEG ON
)
set
(
DEFAULT_VALUE_ENABLE_ZRTP ON
)
set
(
DEFAULT_VALUE_ENABLE_SRTP ON
)
set
(
DEFAULT_VALUE_ENABLE_AMR ON
)
set
(
DEFAULT_VALUE_ENABLE_G729 ON
)
set
(
DEFAULT_VALUE_ENABLE_GSM ON
)
set
(
DEFAULT_VALUE_ENABLE_ILBC ON
)
set
(
DEFAULT_VALUE_ENABLE_ISAC ON
)
set
(
DEFAULT_VALUE_ENABLE_OPUS ON
)
set
(
DEFAULT_VALUE_ENABLE_SILK ON
)
set
(
DEFAULT_VALUE_ENABLE_SPEEX ON
)
set
(
DEFAULT_VALUE_ENABLE_VPX ON
)
set
(
DEFAULT_VALUE_ENABLE_X264 ON
)
set
(
DEFAULT_VALUE_ENABLE_TUNNEL OFF
)
set
(
DEFAULT_VALUE_ENABLE_UNIT_TESTS ON
)
# Include default configuration
include
(
configs/config-default.cmake
)
set
(
AUTOTOOLS_SHARED_LIBRARIES
"--disable-static --enable-shared"
)
set
(
CMAKE_SHARED_LIBRARIES
"-DENABLE_STATIC=0"
)
# cunit
set
(
EP_cunit_CMAKE_OPTIONS
"
${
CMAKE_SHARED_LIBRARIES
}
${
EP_cunit_CMAKE_OPTIONS
}
-DENABLE_CURSES=1"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment