config-desktop-raspberry.cmake 3.01 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
############################################################################
# config-desktop-raspberry.cmake
# Copyright (C) 2016  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
19
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
20 21 22
#
############################################################################

23 24 25 26 27
# Define default values for the linphone builder options
set(DEFAULT_VALUE_ENABLE_BV16 ON)
set(DEFAULT_VALUE_ENABLE_FFMPEG ON)
set(DEFAULT_VALUE_ENABLE_GPL_THIRD_PARTIES ON)
set(DEFAULT_VALUE_ENABLE_GSM ON)
28
set(DEFAULT_VALUE_ENABLE_G729 ${DEFAULT_VALUE_ENABLE_GPL_THIRD_PARTIES})
29
set(DEFAULT_VALUE_ENABLE_G729B_CNG OFF)
30 31 32 33 34 35 36 37 38 39
set(DEFAULT_VALUE_ENABLE_GTK_UI OFF)
set(DEFAULT_VALUE_ENABLE_MBEDTLS ON)
set(DEFAULT_VALUE_ENABLE_MKV ON)
set(DEFAULT_VALUE_ENABLE_OPUS ON)
set(DEFAULT_VALUE_ENABLE_SPEEX ON)
set(DEFAULT_VALUE_ENABLE_SRTP ON)
set(DEFAULT_VALUE_ENABLE_UNIT_TESTS ON)
set(DEFAULT_VALUE_ENABLE_VCARD ON)
set(DEFAULT_VALUE_ENABLE_VIDEO ON)
set(DEFAULT_VALUE_ENABLE_VPX ON)
40
set(DEFAULT_VALUE_ENABLE_WASAPI OFF)
41
set(DEFAULT_VALUE_ENABLE_ZRTP ON)
42

43

44 45
message(STATUS "Buiding for Raspberry PI ${RASPBERRY_VERSION}")

46 47 48 49 50 51
get_filename_component(COMPILER_NAME ${CMAKE_C_COMPILER} NAME)
string(REGEX REPLACE "-gcc$" "" LINPHONE_BUILDER_HOST ${COMPILER_NAME})
unset(COMPILER_NAME)

set(LINPHONE_BUILDER_PKG_CONFIG_PATH "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig/:${SYSROOT_PATH}/usr/lib/pkgconfig")

52
include("configs/config-desktop-common.cmake")
53 54

# ffmpeg
55
lcb_builder_cross_compilation_options(ffmpeg
56 57 58 59 60 61 62 63
	"--prefix=${CMAKE_INSTALL_PREFIX}"
	"--enable-cross-compile"
	"--cross-prefix=arm-linux-gnueabihf-"
	"--arch=arm"
	"--target-os=linux"
)

# opus
64
lcb_builder_cmake_options(opus "-DOPUS_FIXED_POINT=YES")
65

66
# speex
67 68 69 70
lcb_builder_cmake_options(speex
	"-DENABLE_FLOAT_API=NO"
	"-DENABLE_FIXED_POINT=YES"
)
71
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "armv7")
72
	lcb_builder_cmake_options(speex "-DENABLE_ARM_NEON_INTRINSICS=YES")
73 74
endif()

75
# vpx
76
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "armv7")
77
	lcb_builder_cross_compilation_options(vpx
78 79 80 81
		"--prefix=${CMAKE_INSTALL_PREFIX}"
		"--target=armv7-linux-gcc"
	)
else()
82
	lcb_builder_cross_compilation_options(vpx
83 84 85 86
		"--prefix=${CMAKE_INSTALL_PREFIX}"
		"--target=armv6-linux-gcc"
	)
endif()
87

88 89
# Add config step for packaging
set(LINPHONE_BUILDER_ADDITIONAL_CONFIG_STEPS "${CMAKE_CURRENT_LIST_DIR}/desktop-raspberry/additional_steps.cmake")