aboutsummaryrefslogtreecommitdiff
path: root/build-android
diff options
context:
space:
mode:
authorAndrew Poole <a.poole@samsung.com>2023-03-28 10:05:10 +0100
committerCharles Giessen <46324611+charles-lunarg@users.noreply.github.com>2023-04-06 10:18:16 -0600
commit01e0a0a5bebd27fcfb836f133cfe1562d7de45cb (patch)
treea106f3d0d0d0124c25c39970f5cad9721ff1a88a /build-android
parent0522d9f16e32a601046daf778aa2aa0930768e7d (diff)
downloadusermoji-01e0a0a5bebd27fcfb836f133cfe1562d7de45cb.tar.xz
vulkaninfo: Add Android build support
VULKANINFO_WSI_ENABLED is currently disabled for Android as it is not possible to create an ANativeWindow for a native binary app using just the NDK.
Diffstat (limited to 'build-android')
-rwxr-xr-xbuild-android/build_all.sh27
1 files changed, 26 insertions, 1 deletions
diff --git a/build-android/build_all.sh b/build-android/build_all.sh
index ecc49112..9f502452 100755
--- a/build-android/build_all.sh
+++ b/build-android/build_all.sh
@@ -14,6 +14,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+ANDROID_BUILD_DIR=$(dirname $(readlink -f $0))
+PROJECT_DIR=$ANDROID_BUILD_DIR/..
+
if [ -z "${ANDROID_SDK_HOME}" ];
then echo "Please set ANDROID_SDK_HOME, exiting"; exit 1;
else echo "ANDROID_SDK_HOME is ${ANDROID_SDK_HOME}";
@@ -44,7 +47,10 @@ findtool jarsigner
set -ev
-DEMO_BUILD_DIR=$PWD/../cube/android
+VULKANINFO_BUILD_DIR=$PROJECT_DIR/vulkaninfo/android
+echo VULKANINFO_BUILD_DIR="${VULKANINFO_BUILD_DIR}"
+
+DEMO_BUILD_DIR=$PROJECT_DIR/cube/android
echo DEMO_BUILD_DIR="${DEMO_BUILD_DIR}"
function create_APK() {
@@ -54,7 +60,26 @@ function create_APK() {
zipalign -f 4 bin/$1-unaligned.apk bin/$1.apk
}
+#
+# update dependencies
+#
+(
+pushd $ANDROID_BUILD_DIR
./update_external_sources_android.sh --no-build
+popd
+pushd $PROJECT_DIR
+python3 scripts/generate_source.py $ANDROID_BUILD_DIR/third_party/Vulkan-Headers/registry --incremental
+popd
+)
+
+#
+# build vulkaninfo
+#
+(
+pushd $VULKANINFO_BUILD_DIR
+ndk-build -j $cores
+popd
+)
#
# build vkcube APK