Skip to content

samsungdevelopers/CMAA

Repository files navigation

Build

Android

Dependencies

For all dependencies set the following environment variables.

  • CMake v3.10+
  • JDK 8+ JAVA_HOME=<SYSTEM_DIR>/java
  • Android NDK r18+ ANDROID_NDK_ROOT=<WORK_DIR>/android-ndk
  • Android SDK ANDROID_HOME=<WORK_DIR>/android-sdk
  • Gradle 5+ GRADLE_HOME=<WORK_DIR>/gradle

Build with Gradle

Step 1. Generate the gradle project using the internal script by running the following command

Windows
bldsys\scripts\generate_android_gradle.bat
Linux
./bldsys/scripts/generate_android_gradle.sh

A new folder will be created in the root directory at build\android_gradle

Step 2. Build the project

cd build/android_gradle
gradle assembleDebug

Step 3. You can now run the apk on a connected device

adb install build/outputs/apk/debug/vulkan_samples-debug.apk

Alternatively, you may import the build/android_gradle folder in Android Studio and run the project from here

If you are using a newer version of cmake then 3.13, you might get this error:

Execution failed for task ':externalNativeBuildDebug'. Expected output file at <PATH> for target <sample> but there was none

In this case, update the version of the gradle plugin in "bldsys/cmake/template/gradle/build.gradle.in" to 3.5.0, remove the content of build folder and repeat the build process from Step 1. This is known to work with Gradle 6.3 and NDK 20.0.55

If you are using Android Studio, you can simply do these changes after importing the build/android_gradle folder, opening File->Project Structure, and doing the following changes: On the Project tab, change the Android Gradle Plugin version to 3.5.0 and the Gradle version to 6.3.(this also requires NDK 20.0.55)

License

See LICENSE.

This project has some third-party dependencies, each of which may have independent licensing:

  • astc-encoder: ASTC Evaluation Codec
  • CTPL: Thread Pool Library
  • docopt: A C++11 port of the Python argument parsing library
  • glfw: A multi-platform library for OpenGL, OpenGL ES, Vulkan, window and input
  • glm: OpenGL Mathematics
  • glslang: Shader front end and validator
  • dear imgui: Immediate Mode Graphical User Interface
  • HWCPipe: Interface to mobile Hardware Counters
  • KTX-Software: Khronos Texture Library and Tools
  • spdlog: Fast C++ logging library
  • SPIRV-Cross: Parses and converts SPIR-V to other shader languages
  • stb: Single-file public domain (or MIT licensed) libraries
  • tinygltf: Header only C++11 glTF 2.0 file parser
  • nlohmann json: C++ JSON Library (included by tinygltf)
  • vma: Vulkan Memory Allocator
  • volk: Meta loader for Vulkan API
  • vulkan: Sources for the formal documentation of the Vulkan API

This project uses assets from vulkan-samples-assets. Each one has its own license.

Trademarks

Vulkan is a registered trademark of the Khronos Group Inc.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors