Builds: Modular cmake scripts added

Cmake scripts are now modular. Separate scripts now handle
build specifications for each target and dependency.

Toolchain files have been added for armv7, armv8 builds.

Bug: 213579857
Test: Builds using cmake
Test: Builds in OSS-fuzz

Change-Id: Iac62b443c0a0de09a2ce6553a660db2c3d5dc846
15 files changed
tree: 7d62dbc89370c1a8e9438d4965eeb196a9603c3e
  1. cmake/
  2. common/
  3. decoder/
  4. encoder/
  5. fuzzer/
  6. test/
  7. Android.bp
  8. CMakeLists.txt
  9. libavc_blocklist.txt
  10. METADATA
  11. MODULE_LICENSE_APACHE2
  12. NOTICE
  13. OWNERS
  14. PREUPLOAD.cfg
  15. README.md
README.md

LIBAVC

Getting Started Document

LibAVC build steps

Supports:

  • aarch32/aarch64 on Linux.
  • aarch32/aarch64 on Android.
  • x86_32/x86_64 on Linux.

Native Builds

Use the following commands for building on the target machine

$ cd external/libavc
$ mkdir build
$ cd build
$ cmake ..
$ make

Cross-compiler based builds

Building for x86_32 on a x86_64 Linux machine

$ cd external/libavc
$ mkdir build
$ cd build
$ CFLAGS="-m32" CXXFLAGS="-m32" LDFLAGS="-m32" cmake ..
$ make

Building for aarch32/aarch64

Update ‘CMAKE_C_COMPILER’, ‘CMAKE_CXX_COMPILER’, ‘CMAKE_C_COMPILER_AR’, and ‘CMAKE_CXX_COMPILER_AR’ in CMAKE_TOOLCHAIN_FILE passed below

$ cd external/libavc
$ mkdir build
$ cd build

For aarch64

$ cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/aarch64_toolchain.cmake
$ make

For aarch32

$ cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/aarch32_toolchain.cmake
$ make