• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

layerlib/23-Nov-2023-244219

README.mdD23-Nov-20231.5 KiB4438

README.md

1Build Validation Layers with Android CMake Plugin
2=================================================
3Gradle project in this directory builds layers into AAR.
4The project could be directly added into application's gradle projects.
5[Android Studio 3.0.0+](https://developer.android.com/studio/index.html)
6IS required: earlier versions only publish release libs by default.
7
8Pre-requirements
9----------------
10Build ShaderC binary
11- Building from Github Repo source
121. cd android-build
132. ./update_external_sources_android.sh
143. ./android-generate.sh
15
16Extra 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
22Adding layer module into Android Studio application project
23--------------------------------------------------------
241. app's settings.gradle, add
25```
26    include ':layerLib'
27    project(':layerLib').projectDir = new File('/path/to/cmake/layerlib')
28```
292. app's build.gradle:
30```
31dependencies {
32    // Android Studio 3.0.0+ is required
33    implementation project(':layerLib')
34}
35```
36BUILD_IN_NDK variable in layerlib/CMakeLists.txt could detect whether the source is
37from NDK or github repo clone, and would configure the file paths accordingly
38
39Tested
40-----
41Build on Mac OS, tested on Google Pixel XL with Android Oreo.
42Equvilaent build scripts for Windows OS are at the same directory.
43
44