blob: 9ab5eab31a7c91298d84ca3a7de3333e899f0b74 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
if(NOT CMAKE_TOOLCHAIN_FILE)
message(FATAL_ERROR "CMAKE_TOOLCHAIN_FILE required for android. See ${PROJECT_SOURCE_DIR}/README.md")
elseif(NOT SDK_PLATFORM)
message(FATAL_ERROR "Toolchain did not define SDK_PLATFORM. Possibly outdated depends.")
endif()
set(ARCH_DEFINES -DTARGET_POSIX -DTARGET_LINUX -D_LINUX -DTARGET_ANDROID)
set(SYSTEM_DEFINES -D__STDC_CONSTANT_MACROS -D_FILE_DEFINED
-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64)
set(PLATFORM_DIR linux)
if(WITH_ARCH)
set(ARCH ${WITH_ARCH})
else()
if(CPU STREQUAL armeabi-v7a)
set(ARCH arm)
set(NEON True)
set(NEON_FLAGS "-mfpu=neon -mvectorize-with-neon-quad")
elseif(CPU STREQUAL arm64-v8a)
set(ARCH aarch64)
elseif(CPU STREQUAL i686)
set(ARCH i486-linux)
set(NEON False)
else()
message(SEND_ERROR "Unknown CPU: ${CPU}")
endif()
endif()
set(FFMPEG_OPTS --enable-cross-compile --cpu=cortex-a9 --arch=arm --target-os=linux --enable-neon
--disable-vdpau --cc=${CMAKE_C_COMPILER} --host-cc=${CMAKE_C_COMPILER}
--strip=${CMAKE_STRIP})
set(ENABLE_SDL OFF CACHE BOOL "" FORCE)
set(ENABLE_X11 OFF CACHE BOOL "" FORCE)
set(ENABLE_AML OFF CACHE BOOL "" FORCE)
set(ENABLE_OPTICAL OFF CACHE BOOL "" FORCE)
list(APPEND DEPLIBS android log jnigraphics)
|