Commit 80cabceb authored by Ghislain MARY's avatar Ghislain MARY

Various changes for IOS build.

parent 84bde298
......@@ -23,7 +23,9 @@
set(EP_bcg729_GIT_REPOSITORY "git://git.linphone.org/bcg729.git")
set(EP_bcg729_GIT_TAG_LATEST "master")
set(EP_bcg729_GIT_TAG "1.0.0")
set(EP_bcg729_EXTERNAL_SOURCE_PATHS "bcg729")
set(EP_linphone_CMAKE_OPTIONS )
set(EP_linphone_LINKING_TYPE "-DENABLE_STATIC=NO")
set(EP_bcg729_CMAKE_OPTIONS )
set(EP_bcg729_LINKING_TYPE "-DENABLE_STATIC=NO")
set(EP_bcg729_DEPENDENCIES EP_ms2)
......@@ -23,9 +23,10 @@
set(EP_bzrtp_GIT_REPOSITORY "git://git.linphone.org/bzrtp.git")
set(EP_bzrtp_GIT_TAG_LATEST "master")
set(EP_bzrtp_GIT_TAG "1.0.2")
set(EP_bzrtp_EXTERNAL_SOURCE_PATHS "bzrtp")
set(EP_bzrtp_CMAKE_OPTIONS )
set(EP_bzrtp_LINKING_TYPE "-DENABLE_STATIC=0")
set(EP_bzrtp_LINKING_TYPE "-DENABLE_STATIC=NO")
set(EP_bzrtp_DEPENDENCIES )
if(LINPHONE_BUILDER_BUILD_DEPENDENCIES)
list(APPEND EP_bzrtp_DEPENDENCIES EP_polarssl)
......@@ -42,10 +43,11 @@ if(MINGW)
endif()
if(ENABLE_UNIT_TESTS)
list(APPEND EP_bzrtp_CMAKE_OPTIONS "-DENABLE_TESTS=1")
list(APPEND EP_bzrtp_CMAKE_OPTIONS "-DENABLE_TESTS=YES")
if(LINPHONE_BUILDER_BUILD_DEPENDENCIES)
list(APPEND EP_bzrtp_DEPENDENCIES EP_cunit)
endif()
else()
list(APPEND EP_bzrtp_CMAKE_OPTIONS "-DENABLE_TESTS=0")
list(APPEND EP_bzrtp_CMAKE_OPTIONS "-DENABLE_TESTS=NO")
endif()
......@@ -86,7 +86,27 @@ else()
else()
if(APPLE)
set(EP_ffmpeg_TARGET_OS "darwin")
set(EP_ffmpeg_PATCH_COMMAND ${EP_ffmpeg_PATCH_COMMAND} "COMMAND" "${PATCH_PROGRAM}" "-p1" "-i" "${CMAKE_CURRENT_SOURCE_DIR}/builders/ffmpeg/configure-osx.patch" ${EP_ffmpeg_PATCH_OPTIONS})
if(IOS)
list(APPEND EP_ffmpeg_CONFIGURE_OPTIONS
"--enable-cross-compile"
"--cross-prefix=${SDK_BIN_PATH}/"
"--sysroot=${SYSROOT_PATH}"
"--ar=\$AR"
"--cc=\$CC"
"--nm=\$NM"
)
set(EP_ffmpeg_MAKE_OPTIONS "RANLIB=\"\$RANLIB\"")
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
set(EP_ffmpeg_ARCH "arm64")
else()
set(EP_ffmpeg_ARCH "${CMAKE_SYSTEM_PROCESSOR}")
endif()
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "armv7")
list(APPEND EP_ffmpeg_CONFIGURE_OPTIONS "--enable-neon" "--cpu=cortex-a8" "--disable-armv5te" "--enable-armv6" "--enable-armv6t2")
endif()
else()
set(EP_ffmpeg_PATCH_COMMAND ${EP_ffmpeg_PATCH_COMMAND} "COMMAND" "${PATCH_PROGRAM}" "-p1" "-i" "${CMAKE_CURRENT_SOURCE_DIR}/builders/ffmpeg/configure-osx.patch" ${EP_ffmpeg_PATCH_OPTIONS})
endif()
else()
set(EP_ffmpeg_TARGET_OS "linux")
endif()
......
......@@ -23,6 +23,8 @@
set(EP_libilbcrfc3951_GIT_REPOSITORY "git://git.linphone.org/libilbc-rfc3951.git")
set(EP_libilbcrfc3951_GIT_TAG_LATEST "master")
set(EP_libilbcrfc3951_GIT_TAG "bc20f11963878a1f32511de59b05490093e5c9b8")
set(EP_libilbcrfc3951_EXTERNAL_SOURCE_PATHS "libilbc-rfc3951")
set(EP_libilbcrfc3951_CMAKE_OPTIONS )
set(EP_libilbcrfc3951_LINKING_TYPE "-DENABLE_STATIC=YES")
......@@ -23,9 +23,11 @@
set(EP_msilbc_GIT_REPOSITORY "git://git.linphone.org/msilbc.git")
set(EP_msilbc_GIT_TAG_LATEST "master")
set(EP_msilbc_GIT_TAG "ad872a66fad6f047b7ea10625127fb865f5b359a")
set(EP_msilbc_EXTERNAL_SOURCE_PATHS "msilbc")
set(EP_msilbc_CMAKE_OPTIONS )
set(EP_msilbc_DEPENDENCIES EP_ms2 EP_libilbcrfc3951)
if(MSVC)
set(EP_msilbc_EXTRA_LDFLAGS "/SAFESEH:NO")
endif()
......@@ -23,6 +23,8 @@
set(EP_mssilk_GIT_REPOSITORY "git://git.linphone.org/mssilk.git")
set(EP_mssilk_GIT_TAG_LATEST "master")
set(EP_mssilk_GIT_TAG "194543671ed479e756ae449a8a13d7294a46006d")
set(EP_mssilk_EXTERNAL_SOURCE_PATHS "mssilk")
set(EP_mssilk_CMAKE_OPTIONS )
set(EP_mssilk_DEPENDENCIES EP_ms2)
......@@ -45,9 +45,22 @@ if (MSVC)
set(EP_openh264_ADDITIONAL_OPTIONS "OS=\"msvc\"")
endif()
if (APPLE)
if("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "x86_64")
set(EP_openh264_ADDITIONAL_OPTIONS "ARCH=\"x86_64\"")
if(IOS)
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
set(EP_openh264_ADDITIONAL_OPTIONS "OS=\"ios\" ARCH=\"arm64\"")
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "armv7")
set(EP_openh264_ADDITIONAL_OPTIONS "OS=\"ios\" ARCH=\"armv7\"")
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
set(EP_openh264_ADDITIONAL_OPTIONS "OS=\"ios\" ARCH=\"x86_64\"")
else()
set(EP_openh264_ADDITIONAL_OPTIONS "OS=\"ios\" ARCH=\"i386\"")
endif()
else()
set(EP_openh264_ADDITIONAL_OPTIONS "ARCH=\"x86\"")
if("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "x86_64")
set(EP_openh264_ADDITIONAL_OPTIONS "ARCH=\"x86_64\"")
else()
set(EP_openh264_ADDITIONAL_OPTIONS "ARCH=\"x86\"")
endif()
endif()
endif()
......@@ -39,6 +39,7 @@ else()
set(EP_vpx_CONFIG_H_FILE vpx_config.h)
set(EP_vpx_CONFIGURE_OPTIONS
"--enable-error-concealment"
"--enable-multithread"
"--enable-realtime-only"
"--enable-spatial-resampling"
"--enable-vp8"
......@@ -56,10 +57,21 @@ else()
set(EP_vpx_TARGET "x86-win32-gcc")
set(EP_vpx_LINKING_TYPE "--disable-static" "--enable-shared")
elseif(APPLE)
if(CMAKE_OSX_ARCHITECTURES STREQUAL "x86_64")
set(EP_vpx_TARGET "x86_64-darwin10-gcc")
if(IOS)
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
set(EP_vpx_TARGET "arm64-darwin-gcc")
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "armv7")
set(EP_vpx_TARGET "armv7-darwin-gcc")
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
set(EP_vpx_TARGET "x86_64-iphonesimulator-gcc")
else()
endif()
else()
set(EP_vpx_TARGET "x86-darwin10-gcc")
if(CMAKE_OSX_ARCHITECTURES STREQUAL "x86_64")
set(EP_vpx_TARGET "x86_64-darwin10-gcc")
else()
set(EP_vpx_TARGET "x86-darwin10-gcc")
endif()
endif()
set(EP_vpx_LINKING_TYPE "--enable-static" "--disable-shared" "--enable-pic")
set(EP_vpx_BUILD_IN_SOURCE "yes")
......
......@@ -483,6 +483,11 @@ macro(linphone_builder_create_configure_command PROJNAME)
endmacro()
macro(linphone_builder_create_build_command PROJNAME)
set(ep_make_options "${EP_${PROJNAME}_MAKE_OPTIONS}")
endmacro()
# this function invokes configure_file() for the project, using the default file if
# the specific file is not defined
function(linphone_builder_configure_file_for_project PROJNAME CMD DEFAULT_CONF_FILE OUTPUT)
......@@ -530,6 +535,7 @@ function(linphone_builder_add_project PROJNAME)
elseif("${EP_${PROJNAME}_BUILD_METHOD}" STREQUAL "autotools")
linphone_builder_create_autogen_command(${PROJNAME})
linphone_builder_create_configure_command(${PROJNAME})
linphone_builder_create_build_command(${PROJNAME})
if("${EP_${PROJNAME}_CONFIG_H_FILE}" STREQUAL "")
set(ep_config_h_file config.h)
else()
......
......@@ -25,4 +25,4 @@ export PKG_CONFIG_PATH="@LINPHONE_BUILDER_PKG_CONFIG_PATH@"
export PKG_CONFIG_LIBDIR="@LINPHONE_BUILDER_PKG_CONFIG_LIBDIR@"
cd @ep_build@
make V=@AUTOTOOLS_VERBOSE_MAKEFILE@ @ep_redirect_to_file@
make V=@AUTOTOOLS_VERBOSE_MAKEFILE@ @ep_make_options@ @ep_redirect_to_file@
......@@ -25,4 +25,4 @@ export PKG_CONFIG_PATH="@LINPHONE_BUILDER_PKG_CONFIG_PATH@"
export PKG_CONFIG_LIBDIR="@LINPHONE_BUILDER_PKG_CONFIG_LIBDIR@"
cd @ep_build@
make V=@AUTOTOOLS_VERBOSE_MAKEFILE@ @ep_install_target@ @ep_redirect_to_file@
make V=@AUTOTOOLS_VERBOSE_MAKEFILE@ @ep_make_options@ @ep_install_target@ @ep_redirect_to_file@
......@@ -23,14 +23,3 @@
set(PLATFORM "OS")
include(configs/config-ios.cmake)
# speex
list(APPEND EP_speex_CMAKE_OPTIONS
"-DENABLE_FLOAT_API=NO"
"-DENABLE_FIXED_POINT=YES"
"-DENABLE_ARMV7_NEON_ASM=NO"
)
# opus
list(APPEND EP_opus_CMAKE_OPTIONS "-DENABLE_FIXED_POINT=YES")
......@@ -29,12 +29,5 @@ set(LINPHONE_BUILDER_CPPFLAGS "${LINPHONE_BUILDER_CPPFLAGS} -mcpu=cortex-a8")
# speex
list(APPEND EP_speex_CMAKE_OPTIONS
"-DENABLE_FLOAT_API=NO"
"-DENABLE_FIXED_POINT=YES"
"-DENABLE_ARMV7_NEON_ASM=YES"
)
# opus
list(APPEND EP_opus_CMAKE_OPTIONS "-DENABLE_FIXED_POINT=YES")
list(APPEND EP_speex_CMAKE_OPTIONS "-DENABLE_ARMV7_NEON_ASM=YES")
......@@ -22,3 +22,4 @@
set(PLATFORM "Simulator")
include(configs/config-ios.cmake)
......@@ -21,27 +21,27 @@
############################################################################
# Define default values for the linphone builder options
set(DEFAULT_VALUE_ENABLE_VIDEO OFF)
set(DEFAULT_VALUE_ENABLE_VIDEO ON)
set(DEFAULT_VALUE_ENABLE_GPL_THIRD_PARTIES ON)
set(DEFAULT_VALUE_ENABLE_FFMPEG OFF)
set(DEFAULT_VALUE_ENABLE_ZRTP OFF)
set(DEFAULT_VALUE_ENABLE_FFMPEG ON)
set(DEFAULT_VALUE_ENABLE_ZRTP ON)
set(DEFAULT_VALUE_ENABLE_SRTP ON)
set(DEFAULT_VALUE_ENABLE_AMRNB ON)
set(DEFAULT_VALUE_ENABLE_AMRWB OFF)
set(DEFAULT_VALUE_ENABLE_G729 OFF)
set(DEFAULT_VALUE_ENABLE_G729 ON)
set(DEFAULT_VALUE_ENABLE_GSM ON)
set(DEFAULT_VALUE_ENABLE_ILBC OFF)
set(DEFAULT_VALUE_ENABLE_ILBC ON)
set(DEFAULT_VALUE_ENABLE_ISAC OFF)
set(DEFAULT_VALUE_ENABLE_OPUS ON)
set(DEFAULT_VALUE_ENABLE_SILK OFF)
set(DEFAULT_VALUE_ENABLE_SILK ON)
set(DEFAULT_VALUE_ENABLE_SPEEX ON)
set(DEFAULT_VALUE_ENABLE_WASAPI OFF)
set(DEFAULT_VALUE_ENABLE_WEBRTC_AEC OFF)
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 OFF)
set(DEFAULT_VALUE_ENABLE_OPENH264 ON)
set(DEFAULT_VALUE_ENABLE_VPX ON)
set(DEFAULT_VALUE_ENABLE_X264 OFF)
set(DEFAULT_VALUE_ENABLE_TUNNEL OFF)
set(DEFAULT_VALUE_ENABLE_UNIT_TESTS ON)
......@@ -60,7 +60,7 @@ endif("${PLATFORM}" MATCHES "Simulator")
list(GET CMAKE_FIND_ROOT_PATH 0 SYSROOT_PATH)
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_CFLAGS "-std=c99")
set(LINPHONE_BUILDER_LDFLAGS "${COMMON_FLAGS}")
set(LINPHONE_BUILDER_PKG_CONFIG_LIBDIR ${CMAKE_INSTALL_PREFIX}/lib/pkgconfig) # Restrict pkg-config to search in the install directory
unset(COMMON_FLAGS)
......@@ -80,6 +80,13 @@ set(EP_antlr3c_LINKING_TYPE "-DENABLE_STATIC=YES")
set(EP_bellesip_LINKING_TYPE "-DENABLE_STATIC=YES")
list(APPEND EP_bellesip_CMAKE_OPTIONS "-DENABLE_TESTS=NO")
# bcg729
set(EP_bcg729_LINKING_TYPE "-DENABLE_STATIC=YES")
# bzrtp
set(EP_bzrtp_LINKING_TYPE "-DENABLE_STATIC=YES")
list(APPEND EP_bzrtp_CMAKE_OPTIONS "-DENABLE_TESTS=NO")
# cunit
set(EP_cunit_LINKING_TYPE "-DENABLE_STATIC=YES")
......@@ -98,8 +105,21 @@ set(EP_ms2_LINKING_TYPE "-DENABLE_STATIC=YES")
list(APPEND EP_ms2_CMAKE_OPTIONS "-DENABLE_RELATIVE_PREFIX=YES")
list(APPEND EP_ms2_CMAKE_OPTIONS "-DENABLE_ALSA=NO" "-DENABLE_PULSEAUDIO=NO" "-DENABLE_OSS=NO" "-DENABLE_GLX=NO" "-DENABLE_X11=NO" "-DENABLE_XV=NO" "-DENABLE_TOOLS=NO" "-DENABLE_DOC=NO" "-DENABLE_UNIT_TESTS=NO")
# msamr
set(EP_msamr_LINKING_TYPE "-DENABLE_STATIC=YES")
# msilbc
set(EP_msilbc_LINKING_TYPE "-DENABLE_STATIC=YES")
# msopenh264
set(EP_msopenh264_LINKING_TYPE "-DENABLE_STATIC=YES")
# mssilk
set(EP_mssilk_LINKING_TYPE "-DENABLE_STATIC=YES")
# opus
set(EP_opus_LINKING_TYPE "-DENABLE_STATIC=YES")
list(APPEND EP_opus_CMAKE_OPTIONS "-DENABLE_FIXED_POINT=YES")
# ortp
set(EP_ortp_LINKING_TYPE "-DENABLE_STATIC=YES")
......@@ -110,6 +130,7 @@ set(EP_polarssl_LINKING_TYPE "-DUSE_SHARED_POLARSSL_LIBRARY=0")
# speex
set(EP_speex_LINKING_TYPE "-DENABLE_STATIC=YES")
list(APPEND EP_speex_CMAKE_OPTIONS "-DENABLE_FLOAT_API=NO" "-DENABLE_FIXED_POINT=YES")
# srtp
set(EP_srtp_LINKING_TYPE "-DENABLE_STATIC=YES")
......
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