Commit 25ae2c14 authored by Simon Morlat's avatar Simon Morlat

Fix openH264 build on Android: works with -j4 and enable -fPIC for x86,...

Fix openH264 build on Android: works with -j4 and enable -fPIC for x86, otherwise Android linker complains about non-relocatable code.
parent 369e47d1
......@@ -51,13 +51,13 @@ else()
if(MSVC)
lcb_additional_options("OS=\"msvc\"")
elseif(ANDROID)
set(ADDITIONAL_OPTIONS "OS=\"android\" NDKROOT=\"${CMAKE_ANDROID_NDK}\" NDKLEVEL=${ANDROID_PLATFORM_LEVEL} TARGET=\"android-${CMAKE_ANDROID_API}\"")
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\"")
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
set(ADDITIONAL_OPTIONS "${ADDITIONAL_OPTIONS} ARCH=\"arm64\" INCLUDE_PREFIX=\"aarch64-linux-android\"")
else()
set(ADDITIONAL_OPTIONS "${ADDITIONAL_OPTIONS} ARCH=\"x86\" INCLUDE_PREFIX=\"i686-linux-android\"")
set(ADDITIONAL_OPTIONS "${ADDITIONAL_OPTIONS} ARCH=\"x86\" ENABLEPIC=\"Yes\" INCLUDE_PREFIX=\"i686-linux-android\"")
endif()
lcb_additional_options("${ADDITIONAL_OPTIONS}")
elseif(APPLE)
......
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