Commit 64c6173d authored by Ghislain MARY's avatar Ghislain MARY

Initial infrastructure to build for bb10.

parents
############################################################################
# CMakeLists.txt
# 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.
#
############################################################################
cmake_minimum_required(VERSION 2.8)
if(WIN32)
set(LIB_INSTALL_DIR "bin")
else(WIN32)
set(LIB_INSTALL_DIR "lib")
endif(WIN32)
set(PKG_CONFIG_LIBDIR "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig")
set(GENERAL_EP_VARS)
macro(_expand_external_project_vars)
set(GENERAL_EP_ARGS "")
set(GENERAL_EP_VARNAMES "")
foreach(arg ${GENERAL_EP_VARS})
string(REPLACE ":" ";" varname_and_vartype ${arg})
set(target_info_list ${target_info_list})
list(GET varname_and_vartype 0 _varname)
list(GET varname_and_vartype 1 _vartype)
list(APPEND GENERAL_EP_ARGS -D${_varname}:${_vartype}=${${_varname}})
list(APPEND GENERAL_EP_VARNAMES ${_varname})
endforeach()
endmacro()
list(APPEND GENERAL_EP_VARS
CMAKE_SKIP_RPATH:BOOL
CMAKE_MODULE_PATH:PATH
CMAKE_BUILD_TYPE:STRING
CMAKE_CXX_COMPILER:PATH
CMAKE_CXX_FLAGS:STRING
CMAKE_CXX_FLAGS_DEBUG:STRING
CMAKE_CXX_FLAGS_MINSIZEREL:STRING
CMAKE_CXX_FLAGS_RELEASE:STRING
CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING
CMAKE_C_COMPILER:PATH
CMAKE_C_FLAGS:STRING
CMAKE_C_FLAGS_DEBUG:STRING
CMAKE_C_FLAGS_MINSIZEREL:STRING
CMAKE_C_FLAGS_RELEASE:STRING
CMAKE_C_FLAGS_RELWITHDEBINFO:STRING
CMAKE_EXE_LINKER_FLAGS:STRING
CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING
CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING
CMAKE_MODULE_LINKER_FLAGS:STRING
CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING
CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING
CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING
CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING
CMAKE_SHARED_LINKER_FLAGS:STRING
CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING
CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING
CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING
CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING
CMAKE_TOOLCHAIN_FILE:STRING
CMAKE_GENERATOR:STRING
CMAKE_EXTRA_GENERATOR:STRING
CMAKE_INSTALL_PREFIX:PATH
CMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH
CMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH
CMAKE_RUNTIME_OUTPUT_DIRECTORY:PATH
CMAKE_BUNDLE_OUTPUT_DIRECTORY:PATH
CMAKE_SHARED_LINKER_FLAGS:STRING
CMAKE_EXE_LINKER_FLAGS:STRING
CMAKE_MODULE_LINKER_FLAGS:STRING
LIB_INSTALL_DIR:STRING
PKG_CONFIG_LIBDIR:STRING
AUTOTOOLS_CONFIG_SITE:STRING
)
if(APPLE)
list(APPEND GENERAL_EP_VARS
CMAKE_OSX_DEPLOYMENT_TARGET:STRING
CMAKE_OSX_ARCHITECTURES:STRING
)
endif(APPLE)
_expand_external_project_vars()
include(builders/CMakeLists.txt)
############################################################################
# Makefile
# 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.
#
############################################################################
build-bb10-sdk:
export TOOLCHAIN=bb10-i486 && ./scripts/build.sh
export TOOLCHAIN=bb10-arm && ./scripts/build.sh
generate-bb10-sdk: build-bb10-sdk
cd .. && \
zip -r liblinphone-bb10-sdk.zip \
liblinphonesdk/bb10-arm \
liblinphonesdk/bb10-i486
clean-bb10-sdk:
export TOOLCHAIN=bb10-i486 && ./scripts/clean.sh
export TOOLCHAIN=bb10-arm && ./scripts/clean.sh
veryclean-bb10-sdk:
rm -rf build-bb10-i486
rm -rf build-bb10-arm
rm -rf ../liblinphonesdk
############################################################################
# CMakeLists.txt
# 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.
#
############################################################################
cmake_minimum_required(VERSION 2.8)
include(ExternalProject)
# Include builders
set(BUILDERS
cunit
xml2
antlr3c
polarssl
belle-sip
srtp
gsm
speex
opus
linphone
)
foreach(builder ${BUILDERS})
message("-- Including builder ${builder}")
include(${CMAKE_CURRENT_SOURCE_DIR}/builders/${builder}.cmake)
endforeach(builder)
############################################################################
# antlr3c.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.
#
############################################################################
set(AUTOGEN_COMMAND "./autogen.sh")
set(CONFIGURE_OPTIONS
"--prefix=${CMAKE_INSTALL_PREFIX}"
"--host=$ENV{HOST}"
"--disable-static"
"--enable-shared"
)
set(CONFIGURE_COMMAND "PKG_CONFIG_LIBDIR=${PKG_CONFIG_LIBDIR}" "CONFIG_SITE=${AUTOTOOLS_CONFIG_SITE}" "./configure" "${CONFIGURE_OPTIONS}")
set(BUILD_COMMAND "PKG_CONFIG_LIBDIR=${PKG_CONFIG_LIBDIR}" "CONFIG_SITE=${AUTOTOOLS_CONFIG_SITE}" "make" "-C" "<SOURCE_DIR>/runtime/C/")
ExternalProject_Add(EP_antlr3c
GIT_REPOSITORY git://git.linphone.org/antlr3.git
GIT_TAG linphone
CONFIGURE_COMMAND cd <SOURCE_DIR>/runtime/C/ && ${AUTOGEN_COMMAND} COMMAND cd <SOURCE_DIR>/runtime/C/ && ${CONFIGURE_COMMAND}
BUILD_COMMAND ${BUILD_COMMAND}
INSTALL_COMMAND make -C <SOURCE_DIR>/runtime/C/ install
BUILD_IN_SOURCE 1
)
############################################################################
# belle-sip.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.
#
############################################################################
set(AUTOGEN_COMMAND "./autogen.sh")
set(CONFIGURE_OPTIONS
"--prefix=${CMAKE_INSTALL_PREFIX}"
"--host=$ENV{HOST}"
"--disable-static"
"--enable-shared"
"--enable-tls"
)
set(CONFIGURE_COMMAND "PKG_CONFIG_LIBDIR=${PKG_CONFIG_LIBDIR}" "CONFIG_SITE=${AUTOTOOLS_CONFIG_SITE}" "./configure" "${CONFIGURE_OPTIONS}")
set(BUILD_COMMAND "PKG_CONFIG_LIBDIR=${PKG_CONFIG_LIBDIR}" "CONFIG_SITE=${AUTOTOOLS_CONFIG_SITE}" "make")
set(DEPENDENCIES_EP_bellesip EP_antlr3c EP_cunit EP_polarssl)
ExternalProject_Add(EP_bellesip
DEPENDS ${DEPENDENCIES_EP_bellesip}
GIT_REPOSITORY git://git.linphone.org/belle-sip.git
GIT_TAG master
CONFIGURE_COMMAND ${AUTOGEN_COMMAND} COMMAND ${CONFIGURE_COMMAND}
BUILD_COMMAND ${BUILD_COMMAND}
BUILD_IN_SOURCE 1
)
############################################################################
# cunit.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.
#
############################################################################
set(AUTOGEN_COMMAND "./autogen.sh")
set(CONFIGURE_OPTIONS
"--prefix=${CMAKE_INSTALL_PREFIX}"
"--host=$ENV{HOST}"
"--disable-static"
"--enable-shared"
)
set(CONFIGURE_COMMAND "PKG_CONFIG_LIBDIR=${PKG_CONFIG_LIBDIR}" "CONFIG_SITE=${AUTOTOOLS_CONFIG_SITE}" "./configure" "${CONFIGURE_OPTIONS}")
set(BUILD_COMMAND "PKG_CONFIG_LIBDIR=${PKG_CONFIG_LIBDIR}" "CONFIG_SITE=${AUTOTOOLS_CONFIG_SITE}" "make")
ExternalProject_Add(EP_cunit
GIT_REPOSITORY git://git.linphone.org/cunit.git
GIT_TAG linphone
CONFIGURE_COMMAND ${AUTOGEN_COMMAND} COMMAND ${CONFIGURE_COMMAND}
BUILD_COMMAND ${BUILD_COMMAND}
BUILD_IN_SOURCE 1
)
############################################################################
# gsm.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.
#
############################################################################
ExternalProject_Add(EP_gsm
GIT_REPOSITORY git://git.linphone.org/gsm.git
GIT_TAG linphone
PATCH_COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/builders/gsm/CMakeLists.txt <SOURCE_DIR>
CMAKE_ARGS ${GENERAL_EP_ARGS}
)
############################################################################
# CMakeLists.txt
# 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.
#
############################################################################
cmake_minimum_required(VERSION 2.6)
project(GSM C)
include_directories(
inc/
)
set(GSM_SOURCE_FILES
src/add.c
src/code.c
src/debug.c
src/decode.c
src/long_term.c
src/lpc.c
src/preprocess.c
src/rpe.c
src/gsm_destroy.c
src/gsm_decode.c
src/gsm_encode.c
src/gsm_explode.c
src/gsm_implode.c
src/gsm_create.c
src/gsm_print.c
src/gsm_option.c
src/short_term.c
src/table.c
)
add_library(gsm SHARED ${GSM_SOURCE_FILES})
install(TARGETS gsm
DESTINATION ${LIB_INSTALL_DIR}
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
file(GLOB HEADER_FILES "inc/gsm.h")
install(FILES ${HEADER_FILES}
DESTINATION include/gsm
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
)
############################################################################
# linphone.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.
#
############################################################################
set(AUTOGEN_COMMAND "./autogen.sh")
set(CONFIGURE_OPTIONS
"--prefix=${CMAKE_INSTALL_PREFIX}"
"--host=$ENV{HOST}"
"--disable-static"
"--enable-shared"
"--disable-strict"
"--disable-nls"
"--with-readline=none"
"--enable-gtk_ui=no"
"--enable-console_ui=no"
"--disable-theora"
"--disable-sdl"
"--disable-x11"
"--enable-bellesip"
"--disable-tutorials"
"--disable-tools"
"--disable-msg-storage"
"--disable-video"
"--disable-zrtp"
"--enable-broken-srtp"
"--disable-alsa"
)
set(CONFIGURE_COMMAND "PKG_CONFIG_LIBDIR=${PKG_CONFIG_LIBDIR}" "CONFIG_SITE=${AUTOTOOLS_CONFIG_SITE}" "./configure" "${CONFIGURE_OPTIONS}")
set(BUILD_COMMAND "PKG_CONFIG_LIBDIR=${PKG_CONFIG_LIBDIR}" "CONFIG_SITE=${AUTOTOOLS_CONFIG_SITE}" "make")
set(DEPENDENCIES_EP_linphone EP_bellesip EP_xml2 EP_gsm EP_speex EP_opus EP_srtp)
ExternalProject_Add(EP_linphone
DEPENDS ${DEPENDENCIES_EP_linphone}
GIT_REPOSITORY git://git.linphone.org/linphone.git
GIT_TAG master
CONFIGURE_COMMAND ${AUTOGEN_COMMAND} COMMAND ${CONFIGURE_COMMAND}
BUILD_COMMAND ${BUILD_COMMAND}
BUILD_IN_SOURCE 1
)
############################################################################
# opus.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.
#
############################################################################
set(AUTOGEN_COMMAND "./autogen.sh")
set(CONFIGURE_OPTIONS
"--prefix=${CMAKE_INSTALL_PREFIX}"
"--host=$ENV{HOST}"
"--disable-static"
"--enable-shared"
"--disable-extra-programs"
"--disable-doc"
"--enable-fixed-point"
"--disable-asm"
)
set(CONFIGURE_COMMAND "PKG_CONFIG_LIBDIR=${PKG_CONFIG_LIBDIR}" "CONFIG_SITE=${AUTOTOOLS_CONFIG_SITE}" "./configure" "${CONFIGURE_OPTIONS}")
set(BUILD_COMMAND "PKG_CONFIG_LIBDIR=${PKG_CONFIG_LIBDIR}" "CONFIG_SITE=${AUTOTOOLS_CONFIG_SITE}" "make")
ExternalProject_Add(EP_opus
GIT_REPOSITORY git://git.opus-codec.org/opus.git
GIT_TAG v1.0.3
CONFIGURE_COMMAND ${AUTOGEN_COMMAND} COMMAND ${CONFIGURE_COMMAND}
BUILD_COMMAND ${BUILD_COMMAND}
BUILD_IN_SOURCE 1
)
############################################################################
# polarssl.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.
#
############################################################################
ExternalProject_Add(EP_polarssl
GIT_REPOSITORY git://git.linphone.org/polarssl.git
GIT_TAG linphone
CMAKE_ARGS ${GENERAL_EP_ARGS}
)
############################################################################
# speex.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.
#
############################################################################
set(AUTOGEN_COMMAND "./autogen.sh")
set(CONFIGURE_OPTIONS
"--prefix=${CMAKE_INSTALL_PREFIX}"
"--host=$ENV{HOST}"
"--disable-static"
"--enable-shared"
"--disable-ogg"
)
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "arm")
list(APPEND CONFIGURE_OPTIONS
"--enable-fixed-point"
"--disable-float-api"
)
#"--enable-armv7neon-asm"
endif()
set(CONFIGURE_COMMAND "PKG_CONFIG_LIBDIR=${PKG_CONFIG_LIBDIR}" "CONFIG_SITE=${AUTOTOOLS_CONFIG_SITE}" "./configure" "${CONFIGURE_OPTIONS}")
set(BUILD_COMMAND "PKG_CONFIG_LIBDIR=${PKG_CONFIG_LIBDIR}" "CONFIG_SITE=${AUTOTOOLS_CONFIG_SITE}" "make")
ExternalProject_Add(EP_speex
GIT_REPOSITORY git://git.linphone.org/speex.git
GIT_TAG linphone
CONFIGURE_COMMAND ${AUTOGEN_COMMAND} COMMAND ${CONFIGURE_COMMAND}
BUILD_COMMAND ${BUILD_COMMAND}
BUILD_IN_SOURCE 1
)
############################################################################
# srtp.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.
#
############################################################################
set(AUTOGEN_COMMAND "autoconf")
set(CONFIGURE_OPTIONS
"--prefix=${CMAKE_INSTALL_PREFIX}"
"--host=$ENV{HOST}"
)
set(CONFIGURE_COMMAND "PKG_CONFIG_LIBDIR=${PKG_CONFIG_LIBDIR}" "CONFIG_SITE=${AUTOTOOLS_CONFIG_SITE}" "./configure" "${CONFIGURE_OPTIONS}")
set(BUILD_COMMAND "PKG_CONFIG_LIBDIR=${PKG_CONFIG_LIBDIR}" "CONFIG_SITE=${AUTOTOOLS_CONFIG_SITE}" "make" "libsrtp.so")
ExternalProject_Add(EP_srtp
GIT_REPOSITORY git://git.linphone.org/srtp.git
GIT_TAG master
CONFIGURE_COMMAND ${AUTOGEN_COMMAND} COMMAND ${CONFIGURE_COMMAND}
BUILD_COMMAND ${BUILD_COMMAND}
BUILD_IN_SOURCE 1
)
############################################################################
# xml2.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.
#
############################################################################
set(AUTOGEN_COMMAND "PKG_CONFIG_LIBDIR=${PKG_CONFIG_LIBDIR}" "CONFIG_SITE=${AUTOTOOLS_CONFIG_SITE}" "./autogen.sh" "--prefix=${CMAKE_INSTALL_PREFIX}" "--host=$ENV{HOST}")
set(CONFIGURE_OPTIONS
"--disable-static"
"--enable-shared"
"--disable-rebuild-docs"
"--with-iconv=no"
"--with-python=no"
"--with-zlib=no"
"--with-modules=no"
)
set(BUILD_COMMAND "PKG_CONFIG_LIBDIR=${PKG_CONFIG_LIBDIR}" "CONFIG_SITE=${AUTOTOOLS_CONFIG_SITE}" "make")
ExternalProject_Add(EP_xml2
GIT_REPOSITORY git://git.gnome.org/libxml2
GIT_TAG v2.8.0
CONFIGURE_COMMAND ${AUTOGEN_COMMAND} ${CONFIGURE_OPTIONS}
BUILD_COMMAND ${BUILD_COMMAND}
BUILD_IN_SOURCE 1
)
#!/bin/bash
############################################################################
# build.sh
# 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.
#
############################################################################
pushd `dirname $0` > /dev/null
SCRIPTPATH=`pwd -P`
popd > /dev/null
ROOTPATH=${SCRIPTPATH}/../
LIBLINPHONESDKPATH=${ROOTPATH}/../liblinphonesdk
source toolchains/${TOOLCHAIN}.site
export HOST=$HOST
export CC=$CC
export CXX=$CXX
export LD=$LD
export AR=$AR
export RANLIB=$RANLIB
export STRIP=$STRIP
export NM=$NM
export CPPFLAGS=$CPPFLAGS
export CFLAGS=$CFLAGS
export LDFLAGS=$LDFLAGS
mkdir -p ${LIBLINPHONESDKPATH} && \
mkdir -p ${ROOTPATH}/build-${TOOLCHAIN} && \
cd ${ROOTPATH}/build-${TOOLCHAIN} && \
cmake -DCMAKE_TOOLCHAIN_FILE=${ROOTPATH}/toolchains/${TOOLCHAIN}.cmake -DAUTOTOOLS_CONFIG_SITE=${ROOTPATH}/toolchains/${TOOLCHAIN}.site .. -DCMAKE_INSTALL_PREFIX=${LIBLINPHONESDKPATH}/${TOOLCHAIN} && \
make
#!/bin/bash
############################################################################
# clean.sh
# 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.
#
############################################################################
pushd `dirname $0` > /dev/null
SCRIPTPATH=`pwd -P`
popd > /dev/null
ROOTPATH=${SCRIPTPATH}/../
source toolchains/${TOOLCHAIN}.site
export CC=$CC
export CXX=$CXX
export LD=$LD
export AR=$AR
export RANLIB=$RANLIB
export STRIP=$STRIP
export NM=$NM
export CPPFLAGS=$CPPFLAGS
export CFLAGS=$CFLAGS
export LDFLAGS=$LDFLAGS
if test -d ${ROOTPATH}/build-${TOOLCHAIN} ; then
cd ${ROOTPATH}/build-${TOOLCHAIN} && make clean
fi
############################################################################