Home | History | Annotate | only in /external/vulkan-validation-layers/build-android/cmake
Up to higher level directory
NameDateSize
layerlib/22-Oct-2020
README.md22-Oct-20201.5K

README.md

      1 Build Validation Layers with Android CMake Plugin
      2 =================================================
      3 Gradle project in this directory builds layers into AAR.
      4 The project could be directly added into application's gradle projects.
      5 [Android Studio 3.0.0+](https://developer.android.com/studio/index.html)
      6 IS required: earlier versions only publish release libs by default.
      7 
      8 Pre-requirements
      9 ----------------
     10 Build ShaderC binary
     11 - Building from Github Repo source
     12 1. cd android-build
     13 2. ./update_external_sources_android.sh
     14 3. ./android-generate.sh
     15 
     16 Extra Steps if building from NDK's source tree
     17 ```
     18    cd ${your ANDROID_NDK_ROOT}/sources/third_party/shaderc
     19    ndk-build  APP_ABI=all APP_STL=c++_static NDK_TOOLCHAIN_VERSION=clang NDK_PROJECT_PATH=. APP_BUILD_SCRIPT=Android.mk libshaderc_combined
     20 ```
     21 
     22 Adding layer module into Android Studio application project
     23 --------------------------------------------------------
     24 1. app's settings.gradle, add 
     25 ```
     26     include ':layerLib'
     27     project(':layerLib').projectDir = new File('/path/to/cmake/layerlib')
     28 ```
     29 2. app's build.gradle:
     30 ```
     31 dependencies {
     32     // Android Studio 3.0.0+ is required
     33     implementation project(':layerLib')
     34 }
     35 ```
     36 BUILD_IN_NDK variable in layerlib/CMakeLists.txt could detect whether the source is
     37 from NDK or github repo clone, and would configure the file paths accordingly
     38 
     39 Tested
     40 -----
     41 Build on Mac OS, tested on Google Pixel XL with Android Oreo.
     42 Equvilaent build scripts for Windows OS are at the same directory.
     43 
     44