Commit e0e57977 authored by jehan's avatar jehan
Browse files

enable bitcode only for armxxx

parent d5c58d79
...@@ -50,17 +50,21 @@ if (APPLE) ...@@ -50,17 +50,21 @@ if (APPLE)
if(IOS) if(IOS)
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
set(EP_openh264_ADDITIONAL_OPTIONS "OS=\"ios\" ARCH=\"arm64\"") set(EP_openh264_ADDITIONAL_OPTIONS "OS=\"ios\" ARCH=\"arm64\"")
#XCode7 allows bitcode
if (NOT ${XCODE_VERSION} VERSION_LESS 7)
set(EP_openh264_EXTRA_CFLAGS "-fembed-bitcode")
endif()
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "armv7") elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "armv7")
set(EP_openh264_ADDITIONAL_OPTIONS "OS=\"ios\" ARCH=\"armv7\"") set(EP_openh264_ADDITIONAL_OPTIONS "OS=\"ios\" ARCH=\"armv7\"")
#XCode7 allows bitcode
if (NOT ${XCODE_VERSION} VERSION_LESS 7)
set(EP_openh264_EXTRA_CFLAGS "-fembed-bitcode")
endif()
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64") elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
set(EP_openh264_ADDITIONAL_OPTIONS "OS=\"ios\" ARCH=\"x86_64\"") set(EP_openh264_ADDITIONAL_OPTIONS "OS=\"ios\" ARCH=\"x86_64\"")
else() else()
set(EP_openh264_ADDITIONAL_OPTIONS "OS=\"ios\" ARCH=\"i386\"") set(EP_openh264_ADDITIONAL_OPTIONS "OS=\"ios\" ARCH=\"i386\"")
endif() endif()
#XCode7 allows bitcode
if (NOT ${XCODE_VERSION} VERSION_LESS 7)
set(EP_openh264_EXTRA_CFLAGS "-fembed-bitcode")
endif()
else() else()
if(CMAKE_OSX_ARCHITECTURES STREQUAL "x86_64") if(CMAKE_OSX_ARCHITECTURES STREQUAL "x86_64")
set(EP_openh264_ADDITIONAL_OPTIONS "ARCH=\"x86_64\"") set(EP_openh264_ADDITIONAL_OPTIONS "ARCH=\"x86_64\"")
......
...@@ -22,4 +22,8 @@ ...@@ -22,4 +22,8 @@
set(PLATFORM "OS") set(PLATFORM "OS")
include(configs/config-ios.cmake) include(configs/config-ios.cmake)
#XCode7 allows bitcode
if (NOT ${XCODE_VERSION} VERSION_LESS 7)
set(LINPHONE_BUILDER_CPPFLAGS "${LINPHONE_BUILDER_CPPFLAGS} -fembed-bitcode")
endif()
...@@ -52,10 +52,6 @@ else() ...@@ -52,10 +52,6 @@ else()
set(CLANG_TARGET_SPECIFIER "iphoneos-version-min") set(CLANG_TARGET_SPECIFIER "iphoneos-version-min")
endif() endif()
set(COMMON_FLAGS "-arch ${LINPHONE_BUILDER_OSX_ARCHITECTURES} -m${CLANG_TARGET_SPECIFIER}=${LINPHONE_IOS_DEPLOYMENT_TARGET} -DTARGET_OS_IPHONE=1 -D__IOS -fms-extensions") set(COMMON_FLAGS "-arch ${LINPHONE_BUILDER_OSX_ARCHITECTURES} -m${CLANG_TARGET_SPECIFIER}=${LINPHONE_IOS_DEPLOYMENT_TARGET} -DTARGET_OS_IPHONE=1 -D__IOS -fms-extensions")
#XCode7 allows bitcode
if (NOT ${XCODE_VERSION} VERSION_LESS 7)
set(COMMON_FLAGS "${COMMON_FLAGS} -fembed-bitcode")
endif()
set(LINPHONE_BUILDER_CPPFLAGS "${COMMON_FLAGS} -Dasm=__asm") set(LINPHONE_BUILDER_CPPFLAGS "${COMMON_FLAGS} -Dasm=__asm")
set(LINPHONE_BUILDER_LDFLAGS "${COMMON_FLAGS}") 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 set(LINPHONE_BUILDER_PKG_CONFIG_LIBDIR ${CMAKE_INSTALL_PREFIX}/lib/pkgconfig) # Restrict pkg-config to search in the install directory
......
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