Commit a597f0c2 authored by Nicolas Michon's avatar Nicolas Michon Committed by Simon Morlat

Fix openh264 embedded build on android

parent c0e15ac0
......@@ -51,6 +51,17 @@ else()
if(MSVC)
lcb_additional_options("OS=\"msvc\"")
elseif(ANDROID)
#Temporary fix for 4.3 release. The ANDROID_PLATFORM_LEVEL (and derivatives...) aren't well passed here, so we hardcode it
#(Waiting for proper fix in our android toolchain wrapper to be merged)
if(CMAKE_ANDROID_NDK_VERSION VERSION_LESS 19 AND CMAKE_SYSTEM_PROCESSOR STREQUAL "armv7-a")
set(ANDROID_PLATFORM_LEVEL "17")
set(ANDROID_PLATFORM "android-17")
set(CMAKE_ANDROID_API "17")
else()
set(ANDROID_PLATFORM_LEVEL "21")
set(ANDROID_PLATFORM "android-21")
set(CMAKE_ANDROID_API "21")
endif()
set(ADDITIONAL_OPTIONS "TOOLCHAINPREFIX=\"${ANDROID_TOOLCHAIN_PREFIX}\" OS=\"android\" NDKROOT=\"${CMAKE_ANDROID_NDK}\" NDKLEVEL=${ANDROID_PLATFORM_LEVEL} TARGET=\"android-${CMAKE_ANDROID_API}\"")
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "armv7-a")
set(ADDITIONAL_OPTIONS "${ADDITIONAL_OPTIONS} ARCH=\"arm\" INCLUDE_PREFIX=\"arm-linux-androideabi\"")
......@@ -82,6 +93,7 @@ else()
lcb_additional_options("OS=\"ios\" ARCH=\"i386\"")
endif()
else()
lcb_extra_cflags("-isysroot ${CMAKE_OSX_SYSROOT} -mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET}")
if(CMAKE_OSX_ARCHITECTURES STREQUAL "x86_64")
lcb_additional_options("ARCH=\"x86_64\"")
else()
......
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