Commit 5b2b6c9c authored by Ghislain MARY's avatar Ghislain MARY

Add preliminary support of build for Windows Phone.

parent 6b1e75e6
......@@ -244,6 +244,7 @@ list(APPEND LINPHONE_BUILDER_EP_VARS
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING
CMAKE_EXE_LINKER_FLAGS:STRING
CMAKE_EXTRA_GENERATOR:STRING
CMAKE_GENERATOR_PLATFORM:STRING
CMAKE_INSTALL_PREFIX:PATH
CMAKE_INSTALL_RPATH:PATH
CMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL
......@@ -265,6 +266,8 @@ list(APPEND LINPHONE_BUILDER_EP_VARS
CMAKE_SKIP_RPATH:BOOL
CMAKE_SKIP_BUILD_RPATH:BOOL
CMAKE_VERBOSE_MAKEFILE:BOOL
CMAKE_SYSTEM_NAME:STRING
CMAKE_SYSTEM_VERSION:STRING
MSVC_C_ARCHITECTURE_ID:STRING
MSVC_CXX_ARCHITECTURE_ID:STRING
MSVC_VERSION:STRING
......
############################################################################
# config-windowsphone.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 default values for the linphone builder options
set(DEFAULT_VALUE_ENABLE_VIDEO ON)
set(DEFAULT_VALUE_ENABLE_GPL_THIRD_PARTIES OFF)
set(DEFAULT_VALUE_ENABLE_FFMPEG OFF)
set(DEFAULT_VALUE_ENABLE_ZRTP OFF)
set(DEFAULT_VALUE_ENABLE_SRTP ON)
set(DEFAULT_VALUE_ENABLE_AMRNB OFF)
set(DEFAULT_VALUE_ENABLE_AMRWB OFF)
set(DEFAULT_VALUE_ENABLE_G729 OFF)
set(DEFAULT_VALUE_ENABLE_GSM OFF)
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_WASAPI ON)
set(DEFAULT_VALUE_ENABLE_WEBRTC_AEC ON)
set(DEFAULT_VALUE_ENABLE_H263 OFF)
set(DEFAULT_VALUE_ENABLE_H263P OFF)
set(DEFAULT_VALUE_ENABLE_MPEG4 OFF)
set(DEFAULT_VALUE_ENABLE_OPENH264 OFF)
set(DEFAULT_VALUE_ENABLE_VPX ON)
set(DEFAULT_VALUE_ENABLE_X264 OFF)
set(DEFAULT_VALUE_ENABLE_TUNNEL OFF)
set(DEFAULT_VALUE_ENABLE_UNIT_TESTS OFF)
# Global configuration
set(LINPHONE_BUILDER_CPPFLAGS "-D_ALLOW_KEYWORD_MACROS -D_CRT_SECURE_NO_WARNINGS")
# Include builders
include(builders/CMakeLists.txt)
# belle-sip
list(APPEND EP_bellesip_CMAKE_OPTIONS "-DENABLE_SERVER_SOCKETS=0")
# linphone
list(APPEND EP_linphone_CMAKE_OPTIONS "-DENABLE_RELATIVE_PREFIX=YES" "-DENABLE_CONSOLE_UI=NO" "-DENABLE_GTK_UI=NO" "-DENABLE_NOTIFY=NO" "-DENABLE_TOOLS=NO" "-DENABLE_TUTORIALS=NO" "-DENABLE_UNIT_TESTS=NO" "-DENABLE_UPNP=NO")
# mediastreamer2
list(APPEND EP_ms2_CMAKE_OPTIONS "-DENABLE_RELATIVE_PREFIX=YES" "-DENABLE_UNIT_TESTS=NO" "-DENABLE_TOOLS=NO")
# sqlite3
set(EP_sqlite3_LINKING_TYPE "-DENABLE_STATIC=YES")
# vpx
set(EP_vpx_LINKING_TYPE "--enable-static" "--disable-shared" "--enable-pic")
......@@ -35,8 +35,10 @@ class Target:
self.name = name
self.output = 'OUTPUT'
self.generator = None
self.platform_name = None
self.config_file = None
self.toolchain_file = None
self.additional_args = []
def output_dir(self):
output_dir = self.output
......@@ -51,6 +53,8 @@ class Target:
cmd = ['cmake', '../..']
if self.generator is not None:
cmd += ['-G', self.generator]
if self.platform_name is not None:
cmd += ['-A', self.platform_name]
cmd += ['-DCMAKE_BUILD_TYPE=' + build_type]
cmd += ['-DCMAKE_PREFIX_PATH=' + self.output_dir(), '-DCMAKE_INSTALL_PREFIX=' + self.output_dir()]
if self.toolchain_file is not None:
......@@ -61,6 +65,8 @@ class Target:
cmd += ['-DLINPHONE_BUILDER_LATEST=YES']
if list_cmake_variables:
cmd += ['-L']
for arg in self.additional_args:
cmd += [arg]
for arg in additional_args:
cmd += [arg]
cmd_str = ''
......@@ -157,6 +163,23 @@ class PythonRaspberryTarget(Target):
self.config_file = 'configs/config-python-raspberry.cmake'
self.toolchain_file = 'toolchains/toolchain-raspberry.cmake'
class WindowsPhoneTarget(Target):
def __init__(self, arch, platform):
Target.__init__(self, 'windowsphone-' + arch)
self.config_file = 'configs/config-windowsphone.cmake'
self.generator = 'Visual Studio 12 2013'
self.platform_name = platform
self.output = 'OUTPUT/liblinphone-windowsphone-sdk/' + arch
self.additional_args = ['-DCMAKE_SYSTEM_NAME=WindowsPhone', '-DCMAKE_SYSTEM_VERSION=8.0']
class WindowsPhoneARMTarget(WindowsPhoneTarget):
def __init__(self):
WindowsPhoneTarget.__init__(self, 'arm', 'ARM')
class WindowsPhoneX86Target(WindowsPhoneTarget):
def __init__(self):
WindowsPhoneTarget.__init__(self, 'x86', None)
targets = {}
targets['bb10-arm'] = BB10armTarget()
......@@ -167,6 +190,8 @@ targets['ios-armv7'] = IOSarmv7Target()
targets['ios-armv7s'] = IOSarmv7sTarget()
targets['python'] = PythonTarget()
targets['python-raspberry'] = PythonRaspberryTarget()
targets['windowsphone-arm'] = WindowsPhoneARMTarget()
targets['windowsphone-x86'] = WindowsPhoneX86Target()
target_names = sorted(targets.keys())
......
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