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

23 24
message(STATUS "Buiding for Raspberry PI ${RASPBERRY_VERSION}")

25 26 27 28
get_filename_component(COMPILER_NAME ${CMAKE_C_COMPILER} NAME)
string(REGEX REPLACE "-gcc$" "" LINPHONE_BUILDER_HOST ${COMPILER_NAME})
unset(COMPILER_NAME)

29 30
set(PACKAGE_NAME "linphone4raspberry")

31 32
include("configs/config-python.cmake")

33 34
set(DEFAULT_VALUE_ENABLE_WASAPI OFF)

35
# ffmpeg
Ghislain MARY's avatar
Ghislain MARY committed
36
lcb_builder_cross_compilation_options(ffmpeg
37 38 39 40 41 42 43
	"--prefix=${CMAKE_INSTALL_PREFIX}"
	"--enable-cross-compile"
	"--cross-prefix=arm-linux-gnueabihf-"
	"--arch=arm"
	"--target-os=linux"
)

44
# opus
45
lcb_builder_cmake_options(opus "-DOPUS_FIXED_POINT=YES")
46

47
# speex
48 49
lcb_builder_cmake_options(speex "-DENABLE_FLOAT_API=NO")
lcb_builder_cmake_options(speex "-DENABLE_FIXED_POINT=YES")
50
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "armv7")
51
	lcb_builder_cmake_options(speex "-DENABLE_ARM_NEON_INTRINSICS=YES")
52 53
endif()

54
# vpx
55
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "armv7")
Ghislain MARY's avatar
Ghislain MARY committed
56
	lcb_builder_cross_compilation_options(vpx
57 58 59 60
		"--prefix=${CMAKE_INSTALL_PREFIX}"
		"--target=armv7-linux-gcc"
	)
else()
Ghislain MARY's avatar
Ghislain MARY committed
61
	lcb_builder_cross_compilation_options(vpx
62 63 64 65 66
		"--prefix=${CMAKE_INSTALL_PREFIX}"
		"--target=armv6-linux-gcc"
	)
endif()