Commit 0e703903 authored by Ghislain MARY's avatar Ghislain MARY

Add missing configs and toolchains for IOS (x86_64 and arm64).

parent 23e459ad
############################################################################
# config-ios-armv7s.cmake
# Copyright (C) 2014 Belledonne Communications, Grenoble France
# config-ios-arm64.cmake
# Copyright (C) 2015 Belledonne Communications, Grenoble France
#
############################################################################
#
......@@ -26,11 +26,11 @@ include(configs/config-ios.cmake)
# speex
list(APPEND EP_speex_CMAKE_OPTIONS
"-DENABLE_FLOAT_API=0"
"-DENABLE_FIXED_POINT=1"
"-DENABLE_ARMV7_NEON_ASM=1"
"-DENABLE_FLOAT_API=NO"
"-DENABLE_FIXED_POINT=YES"
"-DENABLE_ARMV7_NEON_ASM=NO"
)
# opus
list(APPEND EP_opus_CONFIGURE_OPTIONS "--enable-fixed-point")
list(APPEND EP_opus_CMAKE_OPTIONS "-DENABLE_FIXED_POINT=YES")
......@@ -30,11 +30,11 @@ set(LINPHONE_BUILDER_CPPFLAGS "${LINPHONE_BUILDER_CPPFLAGS} -mcpu=cortex-a8")
# speex
list(APPEND EP_speex_CMAKE_OPTIONS
"-DENABLE_FLOAT_API=0"
"-DENABLE_FIXED_POINT=1"
"-DENABLE_ARMV7_NEON_ASM=1"
"-DENABLE_FLOAT_API=NO"
"-DENABLE_FIXED_POINT=YES"
"-DENABLE_ARMV7_NEON_ASM=YES"
)
# opus
list(APPEND EP_opus_CONFIGURE_OPTIONS "--enable-fixed-point")
list(APPEND EP_opus_CMAKE_OPTIONS "-DENABLE_FIXED_POINT=YES")
############################################################################
# config-ios-x86_64.cmake
# Copyright (C) 2015 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(PLATFORM "Simulator")
include(configs/config-ios.cmake)
......@@ -58,7 +58,7 @@ else("${PLATFORM}" MATCHES "Simulator")
set(CLANG_TARGET_SPECIFIER "iphoneos-version-min")
endif("${PLATFORM}" MATCHES "Simulator")
list(GET CMAKE_FIND_ROOT_PATH 0 SYSROOT_PATH)
set(COMMON_FLAGS "-arch ${CMAKE_SYSTEM_PROCESSOR} -isysroot ${SYSROOT_PATH} -m${CLANG_TARGET_SPECIFIER}=${SDK_VERSION} -DTARGET_OS_IPHONE=1 -D__IOS -fms-extensions")
set(COMMON_FLAGS "-arch ${SYSTEM_ARCH} -isysroot ${SYSROOT_PATH} -m${CLANG_TARGET_SPECIFIER}=${SDK_VERSION} -DTARGET_OS_IPHONE=1 -D__IOS -fms-extensions")
set(LINPHONE_BUILDER_CPPFLAGS "${COMMON_FLAGS} -Dasm=__asm")
set(LINPHONE_BUILDER_CFLAGS "-std=c99")
set(LINPHONE_BUILDER_LDFLAGS "${COMMON_FLAGS}")
......
......@@ -150,6 +150,10 @@ class IOSi386Target(IOSTarget):
def __init__(self):
IOSTarget.__init__(self, 'i386')
class IOSx8664Target(IOSTarget):
def __init__(self):
IOSTarget.__init__(self, 'x86_64')
class IOSarmv7Target(IOSTarget):
def __init__(self):
IOSTarget.__init__(self, 'armv7')
......@@ -177,6 +181,7 @@ targets['bb10-arm'] = BB10armTarget()
targets['bb10-i486'] = BB10i486Target()
targets['desktop'] = DesktopTarget()
targets['ios-i386'] = IOSi386Target()
targets['ios-x86_64'] = IOSx8664Target()
targets['ios-armv7'] = IOSarmv7Target()
targets['ios-arm64'] = IOSarm64Target()
targets['python'] = PythonTarget()
......
############################################################################
# toolchan-ios.cmake
# toolchain-ios.cmake
# Copyright (C) 2014 Belledonne Communications, Grenoble France
#
############################################################################
......@@ -23,21 +23,21 @@
# Building for iOS is only available under APPLE systems
if(NOT APPLE)
message(FATAL_ERROR "You need to build using a Mac OS X system")
endif(NOT APPLE)
endif()
execute_process(COMMAND xcode-select -print-path OUTPUT_VARIABLE XCODE_PATH OUTPUT_STRIP_TRAILING_WHITESPACE)
if(NOT ${XCODE_SELECT_RESULT} EQUAL 0)
message(FATAL_ERROR "xcode-select failed: ${XCODE_SELECT_RESULT}. You may need to install Xcode.")
endif(NOT ${XCODE_SELECT_RESULT} EQUAL 0)
endif()
if(EXISTS "${XCODE_PATH}/Platforms/iPhone${PLATFORM}.platform/Developer/SDKs/")
# New path with Xcode 4.3
file(GLOB SDK_PATH_LIST "${XCODE_PATH}/Platforms/iPhone${PLATFORM}.platform/Developer/SDKs/iPhone${PLATFORM}*.sdk")
set(SDK_BIN_PATH "${XCODE_PATH}/Platforms/iPhone${PLATFORM}.platform/Developer/usr/bin")
else(EXISTS "${XCODE_PATH}/Platforms/iPhone${PLATFORM}.platform/Developer/SDKs/")
else()
file(GLOB SDK_PATH_LIST "/Developer/Platforms/iPhone${PLATFORM}.platform/Developer/SDKs/iPhone${PLATFORM}*.sdk")
set(SDK_BIN_PATH "/Developer/Platforms/iPhone${PLATFORM}.platform/Developer/usr/bin")
endif(EXISTS "${XCODE_PATH}/Platforms/iPhone${PLATFORM}.platform/Developer/SDKs/")
endif()
list(SORT SDK_PATH_LIST)
list(REVERSE SDK_PATH_LIST)
list(GET SDK_PATH_LIST 0 SYSROOT_PATH)
......@@ -65,7 +65,6 @@ set(CMAKE_CROSSCOMPILING TRUE)
# Define name of the target system
set(CMAKE_SYSTEM_NAME "Darwin")
set(CMAKE_SYSTEM_PROCESSOR ${SYSTEM_PROCESSOR})
set(IOS True)
# Define the compiler
......@@ -79,3 +78,4 @@ set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
# for libraries and headers in the target directories
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
############################################################################
# toolchain-ios-armv7s.cmake
# Copyright (C) 2014 Belledonne Communications, Grenoble France
# toolchain-ios-arm64.cmake
# Copyright (C) 2015 Belledonne Communications, Grenoble France
#
############################################################################
#
......@@ -20,7 +20,9 @@
#
############################################################################
set(SYSTEM_PROCESSOR armv7s)
set(COMPILER_PREFIX "armv7s-apple-darwin")
set(CMAKE_SYSTEM_PROCESSOR aarch64)
set(SYSTEM_ARCH arm64)
set(COMPILER_PREFIX "arm64-apple-darwin")
set(PLATFORM "OS")
include("${CMAKE_CURRENT_LIST_DIR}/ios/toolchain-ios.cmake")
......@@ -20,7 +20,8 @@
#
############################################################################
set(SYSTEM_PROCESSOR armv7)
set(CMAKE_SYSTEM_PROCESSOR armv7)
set(SYSTEM_ARCH armv7)
set(COMPILER_PREFIX "armv7-apple-darwin")
set(PLATFORM "OS")
include("${CMAKE_CURRENT_LIST_DIR}/ios/toolchain-ios.cmake")
......@@ -20,7 +20,9 @@
#
############################################################################
set(SYSTEM_PROCESSOR i386)
set(CMAKE_SYSTEM_PROCESSOR i386)
set(SYSTEM_ARCH i386)
set(COMPILER_PREFIX "i386-apple-darwin")
set(PLATFORM "Simulator")
include("${CMAKE_CURRENT_LIST_DIR}/ios/toolchain-ios.cmake")
############################################################################
# toolchan-ios-x86_64.cmake
# Copyright (C) 2015 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(CMAKE_SYSTEM_PROCESSOR x86_64)
set(SYSTEM_ARCH x86_64)
set(COMPILER_PREFIX "x86_64-apple-darwin")
set(PLATFORM "Simulator")
include("${CMAKE_CURRENT_LIST_DIR}/ios/toolchain-ios.cmake")
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