Skip to main content

Building an Application Library

  • Open CMake Gui, fill in source and build directory and click Configure.
  • A Dialog opens: Select “Ninja” as build system and check “Select toolchain file”
  • Select: cgi_studio_devices\src\Android\ToolchainFiles\GCC-toolchain-x86_64-Android.cmake
    or cgi_studio_devices\src\Android\ToolchainFiles\GCC-toolchain-ARM64-Android.cmake
    depending what you need.
  • After first configure run, perform following cmake configurations:
    MLC_SIMULATION:=OFF    (This is only relevant in case of an MLC application)
    ANDROID_PLATFORM_LEVEL:=<number between 21 and 28, which is the android api level>
    This should be smaller or equal the android version of your device.
    (If you don’t select a level, the toolchain file decides. This might then not be what you want)
  • Finally click “Configure” once more, then “Generate” afterwards.
    If you created the corresponding Asset-Libraries within the designated “Assets” directory before, the platform-specific one gets also copied to the build folder, which is very handy for deploying (see next section).
  • In a CMD window navigate to you build folder and type ninja.
  • This builds the application and should deliver you a libApplicationLib.so file, which we’ll need for the next steps.