parent
b26f55b2b8
commit
868da22f13
@ -0,0 +1,30 @@ |
|||||||
|
# Enable NEON for all ARM processors |
||||||
|
set(ANDROID_ARM_NEON TRUE) |
||||||
|
|
||||||
|
# By including this file all necessary variables that point to compiler, linker, etc. |
||||||
|
# will be setup. Well, almost all. |
||||||
|
# Two variables have to be set before this line though: |
||||||
|
# ANDROID_PLATOFORM - the API level to compile against (number) |
||||||
|
# ANDROID_ABI - the API of the target platform |
||||||
|
include("$ENV{ANDROID_NDK_HOME}/build/cmake/android.toolchain.cmake") |
||||||
|
|
||||||
|
# AS_EXECUTABLE (AV1 Codec Library's variable) should point to an assembler |
||||||
|
# For x86 and x86_64 ABIs it needs yasm |
||||||
|
# For armeabi-v7a and arm64-v8a is is ok to use GNU assembler |
||||||
|
# When ANDROID_ABI is x86 or _86_64, |
||||||
|
# then CMAKE_ASM_NASM_COMPILER variable will point to the yasm compiler (it is set by android.toolchain.cmake) |
||||||
|
if(DEFINED CMAKE_ASM_NASM_COMPILER) |
||||||
|
set(AS_EXECUTABLE ${CMAKE_ASM_NASM_COMPILER}) |
||||||
|
else() |
||||||
|
set(AS_EXECUTABLE ${_CMAKE_TOOLCHAIN_PREFIX}as) |
||||||
|
endif() |
||||||
|
|
||||||
|
# AV1 Codec Library doesn't recognise 'i686' as CMAKE_SYSTEM_PROCESSOR |
||||||
|
# We have to specify x86 in AOM_TARGET_CPU variable instead |
||||||
|
if("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "i686") |
||||||
|
set(AOM_TARGET_CPU x86) |
||||||
|
endif() |
||||||
|
|
||||||
|
# AV1 Codec Library doesn't recognise 'Android' as CMAKE_SYSTEM_NAME |
||||||
|
# We should set it to Linux instead |
||||||
|
set(CMAKE_SYSTEM_NAME "Linux") |
@ -0,0 +1,22 @@ |
|||||||
|
# libaom doesn't support building being in its root directory |
||||||
|
CMAKE_BUILD_DIR=aom_build_${ANDROID_ABI} |
||||||
|
rm -rf ${CMAKE_BUILD_DIR} |
||||||
|
mkdir ${CMAKE_BUILD_DIR} |
||||||
|
cd ${CMAKE_BUILD_DIR} |
||||||
|
|
||||||
|
cmake .. \ |
||||||
|
-DANDROID_PLATFORM=${ANDROID_PLATFORM} \ |
||||||
|
-DANDROID_ABI=${ANDROID_ABI} \ |
||||||
|
-DCMAKE_TOOLCHAIN_FILE=${SCRIPTS_DIR}/libaom/android.cmake \ |
||||||
|
-DCMAKE_INSTALL_PREFIX=${BUILD_DIR_EXTERNAL}/${ANDROID_ABI} \ |
||||||
|
-DCONFIG_PIC=1 \ |
||||||
|
-DCONFIG_AV1_ENCODER=0 \ |
||||||
|
-DCONFIG_RUNTIME_CPU_DETECT=0 \ |
||||||
|
-DENABLE_TESTS=0 \ |
||||||
|
-DENABLE_DOCS=0 \ |
||||||
|
-DENABLE_TESTDATA=0 \ |
||||||
|
-DENABLE_EXAMPLES=0 \ |
||||||
|
-DENABLE_TOOLS=0 |
||||||
|
|
||||||
|
make -j${HOST_NPROC} |
||||||
|
make install |
@ -0,0 +1,15 @@ |
|||||||
|
# Script to download AV1 Codec Library's source code |
||||||
|
|
||||||
|
# Exports SOURCES_DIR_libaom - path where actual sources are stored |
||||||
|
|
||||||
|
echo "Using aom master branch" |
||||||
|
AOM_SOURCES=aom |
||||||
|
if [[ ! -d "$LAME_SOURCES" ]]; then |
||||||
|
git clone https://aomedia.googlesource.com/aom |
||||||
|
fi |
||||||
|
|
||||||
|
cd aom |
||||||
|
git pull origin master |
||||||
|
cd .. |
||||||
|
|
||||||
|
export SOURCES_DIR_libaom=$(pwd)/${AOM_SOURCES} |
Loading…
Reference in new issue