-
Notifications
You must be signed in to change notification settings - Fork 116
Updating project file
Gerry edited this page Apr 14, 2017
·
3 revisions
Build Script in API-Samples are generated during upstream repo syncing up process. If for some reason (like using different stlport) you like to generate scripts yourself, the procedure described here might be helpful.
- Follow instruction in upstream to install all required tools such as:
- cmake
- compiler (gcc)
- python
- others
- Build shaderc in NDK. In a command-prompt navigate to “${ndk_root}/sources/third_party/shaderc” and run the following command
../../../ndk-build NDK_PROJECT_PATH=. APP_BUILD_SCRIPT=Android.mk APP_STL:=gnustl_static APP_ABI=[armeabi-v7a|arm64-v8a|x86|x86_64|all] libshaderc_combined -j16
APP_STL can be:
- gnustl_static
- gnustl_shared
- c++_static
- c++_shared
Samples by default choose gnustl_static, so shaderc needs to be built with gnustl_static too. When you want to use different stlport in the sample, shaderc should be be built with the same stlport flavor.
- Sync external project and generate files. In a command-prompt navigate to repo root, run the following commands
./update_external_sources.sh -s -g
This process is required to build Hologram and demo sample.
- Build Android Studio project file
- Change project template files
- Re-generate API-Sample project files with
cmake -DANDROID=ON -DANDROID_ABI=[armeabi-v7a|arm64-v8a|x86|x86_64|all(default)]
- Import "API Sample" project into Android Studio by choosing “Import project (Eclipse, ADT, Gradle)” and select build.gradle locating at the root of local your repo directory.