Commit 74fa7a3b authored by Ghislain MARY's avatar Ghislain MARY

Define build options.

parent 1bb15295
......@@ -22,26 +22,49 @@
cmake_minimum_required(VERSION 2.8)
set(LINPHONE_BUILDER_TOOLCHAIN "" CACHE STRING "Toolchain to use for the build.")
set(LINPHONE_BUILDER_TOOLCHAIN "desktop" CACHE STRING "Toolchain to use for the build.")
# Include macros definition to be used by builders
include(cmake/LinphoneCMakeBuilder.cmake)
# Include toolchain definition if needed
if(NOT "${LINPHONE_BUILDER_TOOLCHAIN}" STREQUAL "")
message("-- Using toolchain '${LINPHONE_BUILDER_TOOLCHAIN}'")
include(toolchains/toolchain-${LINPHONE_BUILDER_TOOLCHAIN}.cmake)
linphone_builder_apply_toolchain_flags()
endif(NOT "${LINPHONE_BUILDER_TOOLCHAIN}" STREQUAL "")
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)
if(NOT "${LINPHONE_BUILDER_TOOLCHAIN}" STREQUAL "")
include(configs/config-${LINPHONE_BUILDER_TOOLCHAIN}.cmake)
else(NOT "${LINPHONE_BUILDER_TOOLCHAIN}" STREQUAL "")
# Include the desktop configuration by default
include(configs/config-desktop.cmake)
endif(NOT "${LINPHONE_BUILDER_TOOLCHAIN}" STREQUAL "")
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)
......@@ -60,6 +60,12 @@ clean-bb10-arm:
clean-bb10: clean-bb10-i486 clean-bb10-arm
help-bb10:
mkdir -p OUTPUT/liblinphone-bb10-sdk && \
mkdir -p WORK/cmake-bb10-i486 && \
cd WORK/cmake-bb10-i486 && \
cmake ../.. -DLINPHONE_BUILDER_TOOLCHAIN=bb10-i486 -DCMAKE_INSTALL_PREFIX=../../OUTPUT/liblinphone-bb10-sdk/i486 $(filter -D%,$(MAKEFLAGS)) -LH
veryclean:
rm -rf WORK && \
rm -rf OUTPUT
......
......@@ -20,6 +20,24 @@
#
############################################################################
set(DEFAULT_VALUE_ENABLE_VIDEO OFF)
set(DEFAULT_VALUE_ENABLE_GPL_THIRD_PARTIES ON)
set(DEFAULT_VALUE_ENABLE_FFMPEG OFF)
set(DEFAULT_VALUE_ENABLE_ZRTP OFF)
set(DEFAULT_VALUE_ENABLE_SRTP ON)
set(DEFAULT_VALUE_ENABLE_AMR OFF)
set(DEFAULT_VALUE_ENABLE_G729 OFF)
set(DEFAULT_VALUE_ENABLE_GSM ON)
set(DEFAULT_VALUE_ENABLE_ILBC OFF)
set(DEFAULT_VALUE_ENABLE_ISAC OFF)
set(DEFAULT_VALUE_ENABLE_OPUS ON)
set(DEFAULT_VALUE_ENABLE_SILK OFF)
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(AUTOTOOLS_SHARED_LIBRARIES "--disable-static --enable-shared")
set(CMAKE_SHARED_LIBRARIES "-DENABLE_STATIC=0")
......
......@@ -20,6 +20,24 @@
#
############################################################################
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)
# List of the projects to build. The order is important and must follow the dependencies.
set(LINPHONE_BUILDER_BUILDERS
cunit
......@@ -36,6 +54,7 @@ set(LINPHONE_BUILDER_BUILDERS
linphone
)
# cunit
set(EP_cunit_GIT_REPOSITORY "git://git.linphone.org/cunit.git")
set(EP_cunit_GIT_TAG "linphone")
......
############################################################################
# toolchain-desktop.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.
#
############################################################################
# Default toolchain, use native environment. Nothing to be done.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment