Commit ed12b5fe authored by Ghislain MARY's avatar Ghislain MARY
Browse files

Fix build of x264 for iOS.

parent cbeddfa6
......@@ -23,12 +23,9 @@
set(EP_msx264_GIT_REPOSITORY "git://git.linphone.org/msx264.git")
set(EP_msx264_GIT_TAG_LATEST "master")
set(EP_msx264_GIT_TAG "3a9b5a9ff79ea45b9f8f03d03d4a4a9213dc2c5d")
set(EP_msx264_EXTERNAL_SOURCE_PATHS "msx264")
set(EP_msx264_BUILD_METHOD "autotools")
set(EP_msx264_USE_AUTOGEN True)
set(EP_msx264_CROSS_COMPILATION_OPTIONS
"--prefix=${CMAKE_INSTALL_PREFIX}"
"--host=${LINPHONE_BUILDER_HOST}"
)
set(EP_msx264_LINKING_TYPE "--disable-static" "--enable-shared")
set(EP_msx264_LINKING_TYPE "${DEFAULT_VALUE_CMAKE_LINKING_TYPE}")
set(EP_msx264_CMAKE_OPTIONS )
set(EP_msx264_DEPENDENCIES EP_ms2 EP_x264)
......@@ -22,6 +22,8 @@
set(EP_x264_GIT_REPOSITORY "git://git.videolan.org/x264.git")
set(EP_x264_GIT_TAG "adc99d17d8c1fbc164fae8319b40d7c45f30314e")
set(EP_x264_EXTERNAL_SOURCE_PATHS "externals/x264")
set(EP_x264_BUILD_METHOD "autotools")
set(EP_x264_CROSS_COMPILATION_OPTIONS
"--prefix=${CMAKE_INSTALL_PREFIX}"
......@@ -33,6 +35,6 @@ set(EP_x264_CONFIGURE_OPTIONS
)
set(EP_x264_LINKING_TYPE "--enable-shared")
set(EP_x264_CONFIGURE_ENV "CC=$CC")
set(EP_x264_BUILD_IN_SOURCE True)
set(EP_x264_INSTALL_TARGET "install-lib-shared")
set(EP_x264_DEPENDENCIES EP_ffmpeg)
......@@ -20,45 +20,45 @@
#
############################################################################
set(OSX_FLAGS "")
if(NOT "@LINPHONE_BUILDER_OSX_ARCHITECTURES@" STREQUAL "")
set(OSX_FLAGS "${OSX_FLAGS} -arch @LINPHONE_BUILDER_OSX_ARCHITECTURES@")
endif()
if(NOT "@CMAKE_OSX_SYSROOT@" STREQUAL "")
set(OSX_FLAGS "${OSX_FLAGS} -isysroot @CMAKE_OSX_SYSROOT@")
endif()
if("@CMAKE_C_COMPILER_ID@" STREQUAL "GNU")
string(REGEX REPLACE "gcc$" "as" AS_COMPILER "@CMAKE_C_COMPILER@")
set(AUTOTOOLS_AS_COMPILER ${AS_COMPILER} CACHE PATH "Initial cache" FORCE)
endif()
set(AUTOTOOLS_C_COMPILER "@CMAKE_C_COMPILER@" CACHE PATH "Initial cache" FORCE)
set(AUTOTOOLS_CXX_COMPILER "@CMAKE_CXX_COMPILER@" CACHE PATH "Initial cache" FORCE)
set(AUTOTOOLS_OBJC_COMPILER "@CMAKE_C_COMPILER@" CACHE PATH "Initial cache" FORCE)
set(AUTOTOOLS_C_COMPILER "@CMAKE_C_COMPILER@ ${OSX_FLAGS}" CACHE PATH "Initial cache" FORCE)
set(AUTOTOOLS_CXX_COMPILER "@CMAKE_CXX_COMPILER@ ${OSX_FLAGS}" CACHE PATH "Initial cache" FORCE)
set(AUTOTOOLS_OBJC_COMPILER "@CMAKE_C_COMPILER@ ${OSX_FLAGS}" CACHE PATH "Initial cache" FORCE)
set(AUTOTOOLS_LINKER "@CMAKE_LINKER@" CACHE PATH "Initial cache" FORCE)
set(AUTOTOOLS_AR "@CMAKE_AR@" CACHE PATH "Initial cache" FORCE)
set(AUTOTOOLS_RANLIB "@CMAKE_RANLIB@" CACHE PATH "Initial cache" FORCE)
set(AUTOTOOLS_STRIP "@CMAKE_STRIP@" CACHE PATH "Initial cache" FORCE)
set(AUTOTOOLS_NM "@CMAKE_NM@" CACHE PATH "Initial cache" FORCE)
set(OSX_FLAGS "")
if(NOT "@LINPHONE_BUILDER_OSX_ARCHITECTURES@" STREQUAL "")
set(OSX_FLAGS "${OSX_FLAGS} -arch @LINPHONE_BUILDER_OSX_ARCHITECTURES@")
endif()
if(NOT "@CMAKE_OSX_SYSROOT@" STREQUAL "")
set(OSX_FLAGS "${OSX_FLAGS} -isysroot @CMAKE_OSX_SYSROOT@")
endif()
set(AUTOTOOLS_C_FLAGS_DEBUG "@CMAKE_C_FLAGS_DEBUG@ ${OSX_FLAGS}" CACHE STRING "Initial cache" FORCE)
set(AUTOTOOLS_C_FLAGS_MINSIZEREL "@CMAKE_C_FLAGS_MINSIZEREL@ ${OSX_FLAGS}" CACHE STRING "Initial cache" FORCE)
set(AUTOTOOLS_C_FLAGS_RELEASE "@CMAKE_C_FLAGS_RELEASE@ ${OSX_FLAGS}" CACHE STRING "Initial cache" FORCE)
set(AUTOTOOLS_C_FLAGS_RELWITHDEBINFO "@CMAKE_C_FLAGS_RELWITHDEBINFO@ ${OSX_FLAGS}" CACHE STRING "Initial cache" FORCE)
set(AUTOTOOLS_C_FLAGS "@CMAKE_C_FLAGS@ ${OSX_FLAGS}" CACHE STRING "Initial cache" FORCE)
set(AUTOTOOLS_CXX_FLAGS_DEBUG "@CMAKE_CXX_FLAGS_DEBUG@ ${OSX_FLAGS}" CACHE STRING "Initial cache" FORCE)
set(AUTOTOOLS_CXX_FLAGS_MINSIZEREL "@CMAKE_CXX_FLAGS_MINSIZEREL@ ${OSX_FLAGS}" CACHE STRING "Initial cache" FORCE)
set(AUTOTOOLS_CXX_FLAGS_RELEASE "@CMAKE_CXX_FLAGS_RELEASE@ ${OSX_FLAGS}" CACHE STRING "Initial cache" FORCE)
set(AUTOTOOLS_CXX_FLAGS_RELWITHDEBINFO "@CMAKE_CXX_FLAGS_RELWITHDEBINFO@ ${OSX_FLAGS}" CACHE STRING "Initial cache" FORCE)
set(AUTOTOOLS_CXX_FLAGS "@CMAKE_CXX_FLAGS@ ${OSX_FLAGS}" CACHE STRING "Initial cache" FORCE)
set(AUTOTOOLS_OBJC_FLAGS_DEBUG "@CMAKE_C_FLAGS_DEBUG@ ${OSX_FLAGS}" CACHE STRING "Initial cache" FORCE)
set(AUTOTOOLS_OBJC_FLAGS_MINSIZEREL "@CMAKE_C_FLAGS_MINSIZEREL@ ${OSX_FLAGS}" CACHE STRING "Initial cache" FORCE)
set(AUTOTOOLS_OBJC_FLAGS_RELEASE "@CMAKE_C_FLAGS_RELEASE@ ${OSX_FLAGS}" CACHE STRING "Initial cache" FORCE)
set(AUTOTOOLS_OBJC_FLAGS_RELWITHDEBINFO "@CMAKE_C_FLAGS_RELWITHDEBINFO@ ${OSX_FLAGS}" CACHE STRING "Initial cache" FORCE)
set(AUTOTOOLS_OBJC_FLAGS "@CMAKE_C_FLAGS@ ${OSX_FLAGS}" CACHE STRING "Initial cache" FORCE)
set(AUTOTOOLS_LINKER_FLAGS_DEBUG "@CMAKE_EXE_LINKER_FLAGS_DEBUG@ ${OSX_FLAGS}" CACHE STRING "Initial cache" FORCE)
set(AUTOTOOLS_LINKER_FLAGS_MINSIZEREL "@CMAKE_EXE_LINKER_FLAGS_MINSIZEREL@ ${OSX_FLAGS}" CACHE STRING "Initial cache" FORCE)
set(AUTOTOOLS_LINKER_FLAGS_RELEASE "@CMAKE_EXE_LINKER_FLAGS_RELEASE@ ${OSX_FLAGS}" CACHE STRING "Initial cache" FORCE)
set(AUTOTOOLS_LINKER_FLAGS_RELWITHDEBINFO "@CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO@ ${OSX_FLAGS}" CACHE STRING "Initial cache" FORCE)
set(AUTOTOOLS_LINKER_FLAGS "@CMAKE_EXE_LINKER_FLAGS@ ${OSX_FLAGS}" CACHE STRING "Initial cache" FORCE)
set(AUTOTOOLS_C_FLAGS_DEBUG "@CMAKE_C_FLAGS_DEBUG@" CACHE STRING "Initial cache" FORCE)
set(AUTOTOOLS_C_FLAGS_MINSIZEREL "@CMAKE_C_FLAGS_MINSIZEREL@" CACHE STRING "Initial cache" FORCE)
set(AUTOTOOLS_C_FLAGS_RELEASE "@CMAKE_C_FLAGS_RELEASE@" CACHE STRING "Initial cache" FORCE)
set(AUTOTOOLS_C_FLAGS_RELWITHDEBINFO "@CMAKE_C_FLAGS_RELWITHDEBINFO@" CACHE STRING "Initial cache" FORCE)
set(AUTOTOOLS_C_FLAGS "@CMAKE_C_FLAGS@" CACHE STRING "Initial cache" FORCE)
set(AUTOTOOLS_CXX_FLAGS_DEBUG "@CMAKE_CXX_FLAGS_DEBUG@" CACHE STRING "Initial cache" FORCE)
set(AUTOTOOLS_CXX_FLAGS_MINSIZEREL "@CMAKE_CXX_FLAGS_MINSIZEREL@" CACHE STRING "Initial cache" FORCE)
set(AUTOTOOLS_CXX_FLAGS_RELEASE "@CMAKE_CXX_FLAGS_RELEASE@" CACHE STRING "Initial cache" FORCE)
set(AUTOTOOLS_CXX_FLAGS_RELWITHDEBINFO "@CMAKE_CXX_FLAGS_RELWITHDEBINFO@" CACHE STRING "Initial cache" FORCE)
set(AUTOTOOLS_CXX_FLAGS "@CMAKE_CXX_FLAGS@" CACHE STRING "Initial cache" FORCE)
set(AUTOTOOLS_OBJC_FLAGS_DEBUG "@CMAKE_C_FLAGS_DEBUG@" CACHE STRING "Initial cache" FORCE)
set(AUTOTOOLS_OBJC_FLAGS_MINSIZEREL "@CMAKE_C_FLAGS_MINSIZEREL@" CACHE STRING "Initial cache" FORCE)
set(AUTOTOOLS_OBJC_FLAGS_RELEASE "@CMAKE_C_FLAGS_RELEASE@" CACHE STRING "Initial cache" FORCE)
set(AUTOTOOLS_OBJC_FLAGS_RELWITHDEBINFO "@CMAKE_C_FLAGS_RELWITHDEBINFO@" CACHE STRING "Initial cache" FORCE)
set(AUTOTOOLS_OBJC_FLAGS "@CMAKE_C_FLAGS@" CACHE STRING "Initial cache" FORCE)
set(AUTOTOOLS_LINKER_FLAGS_DEBUG "@CMAKE_EXE_LINKER_FLAGS_DEBUG@" CACHE STRING "Initial cache" FORCE)
set(AUTOTOOLS_LINKER_FLAGS_MINSIZEREL "@CMAKE_EXE_LINKER_FLAGS_MINSIZEREL@" CACHE STRING "Initial cache" FORCE)
set(AUTOTOOLS_LINKER_FLAGS_RELEASE "@CMAKE_EXE_LINKER_FLAGS_RELEASE@" CACHE STRING "Initial cache" FORCE)
set(AUTOTOOLS_LINKER_FLAGS_RELWITHDEBINFO "@CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO@" CACHE STRING "Initial cache" FORCE)
set(AUTOTOOLS_LINKER_FLAGS "@CMAKE_EXE_LINKER_FLAGS@" CACHE STRING "Initial cache" FORCE)
......@@ -54,6 +54,7 @@ set(DEFAULT_VALUE_ENABLE_PACKAGING OFF)
set(SDK_VERSION 6.0)
get_filename_component(COMPILER_NAME ${CMAKE_C_COMPILER} NAME)
string(REGEX REPLACE "-clang$" "" LINPHONE_BUILDER_HOST ${COMPILER_NAME})
string(REGEX REPLACE "^arm64" "aarch64" LINPHONE_BUILDER_HOST ${LINPHONE_BUILDER_HOST})
unset(COMPILER_NAME)
if("${PLATFORM}" MATCHES "Simulator")
set(CLANG_TARGET_SPECIFIER "ios-simulator-version-min")
......@@ -125,3 +126,8 @@ list(APPEND EP_speex_CMAKE_OPTIONS "-DENABLE_FLOAT_API=NO" "-DENABLE_FIXED_POINT
# vpx
set(EP_vpx_LINKING_TYPE "--enable-static" "--disable-shared")
# x264
set(EP_x264_LINKING_TYPE "--enable-static" "--enable-pic")
set(EP_x264_INSTALL_TARGET "install-lib-static")
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