4

I am trying to understand how to build executable and libraries using Android.mk and Android.bp under AOSP. And I am able to compile simple c programs.

I was wondering if there is a way to cross-compile existing CMake and meson projects under AOSP.

Do I need to manually convert them into Android.mk, Android.bp or does AOSP build system provide any mechanism to directly build meson and CMake projects?

Hardik Shah
  • 4,042
  • 2
  • 20
  • 41
masterajay
  • 63
  • 3

1 Answers1

2

You have to create separate Android.mk or Android.bp. Refer to mesa3d project which uses meson for Linux and has a separate Android.mk to build inside AOSP.

ADD: Also there's another approach to building native projects within AOSP from glodroid/aospext, unfortunately not well documented.

picoworm
  • 310
  • 3
  • 13
  • You can also refer to other projects in AOSP/external folder which contains the meson.build file or CMakeLists.txt file for references. – Arpan Jan 05 '23 at 09:13