diff options
| author | Juan Ramos <juan@lunarg.com> | 2023-09-29 14:17:54 -0600 |
|---|---|---|
| committer | Juan Ramos <114601453+juan-lunarg@users.noreply.github.com> | 2023-09-29 15:13:17 -0600 |
| commit | 3a19c1973f0e4732b8f3746593aee2ac425ecb78 (patch) | |
| tree | 581ec08ca263855073aa654fb0e9e19d7f274092 | |
| parent | 8091ef4f9fd4df3aa7192095eca3ae9cbee56198 (diff) | |
| download | usermoji-3a19c1973f0e4732b8f3746593aee2ac425ecb78.tar.xz | |
android: Various fixes to get closer to Android on CMake
Remove vulkaninfo from Android builds
Don't use the loader on Android
| -rw-r--r-- | CMakeLists.txt | 4 | ||||
| -rwxr-xr-x | build-android/build_all.sh | 12 | ||||
| -rw-r--r-- | scripts/known_good.json | 7 | ||||
| -rw-r--r-- | tests/CMakeLists.txt | 4 | ||||
| -rw-r--r-- | vulkaninfo/CMakeLists.txt | 4 | ||||
| -rw-r--r-- | vulkaninfo/android/.gitignore | 3 | ||||
| -rw-r--r-- | vulkaninfo/android/jni/Android.mk | 28 | ||||
| -rw-r--r-- | vulkaninfo/android/jni/Application.mk | 22 |
8 files changed, 16 insertions, 68 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 6c73e28a..fb8f36f4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -55,7 +55,9 @@ if(APPLE) endif() find_package(VulkanHeaders REQUIRED CONFIG) -find_package(VulkanLoader REQUIRED CONFIG) +if (NOT ANDROID) + find_package(VulkanLoader REQUIRED CONFIG) +endif() include(GNUInstallDirs) diff --git a/build-android/build_all.sh b/build-android/build_all.sh index 9f502452..1a842e61 100755 --- a/build-android/build_all.sh +++ b/build-android/build_all.sh @@ -47,9 +47,6 @@ findtool jarsigner set -ev -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}" @@ -73,15 +70,6 @@ popd ) # -# build vulkaninfo -# -( -pushd $VULKANINFO_BUILD_DIR -ndk-build -j $cores -popd -) - -# # build vkcube APK # ( diff --git a/scripts/known_good.json b/scripts/known_good.json index 62392372..e96eda81 100644 --- a/scripts/known_good.json +++ b/scripts/known_good.json @@ -36,6 +36,11 @@ "-DLOADER_USE_UNSAFE_FILE_SEARCH=ON" ], "commit": "v1.3.266", + "build_platforms": [ + "windows", + "linux", + "darwin" + ], "deps": [ { "var_name": "VULKAN_HEADERS_INSTALL_DIR", @@ -66,4 +71,4 @@ "MoltenVK": "MOLTENVK_REPO_ROOT", "googletest": "GOOGLETEST_INSTALL_DIR" } -} +}
\ No newline at end of file diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 0d9fb1b4..9e419c9c 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -15,6 +15,10 @@ # limitations under the License. # ~~~ +if (ANDROID) + return() +endif() + # setup binary_locations_$<CONFIG>.h.in using binary_locations.h.in as a source file(GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/binary_locations_$<CONFIG>.h" INPUT "${CMAKE_CURRENT_SOURCE_DIR}/binary_locations.h.in") diff --git a/vulkaninfo/CMakeLists.txt b/vulkaninfo/CMakeLists.txt index 73947d28..43148642 100644 --- a/vulkaninfo/CMakeLists.txt +++ b/vulkaninfo/CMakeLists.txt @@ -15,7 +15,9 @@ # limitations under the License. # ~~~ -# CMakeLists.txt file for building Vulkaninfo +if (ANDROID) + return() +endif() if(WIN32) # ~~~ diff --git a/vulkaninfo/android/.gitignore b/vulkaninfo/android/.gitignore deleted file mode 100644 index 8008f254..00000000 --- a/vulkaninfo/android/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -bin -libs -obj diff --git a/vulkaninfo/android/jni/Android.mk b/vulkaninfo/android/jni/Android.mk deleted file mode 100644 index f3adbd5b..00000000 --- a/vulkaninfo/android/jni/Android.mk +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright 2015 The Android Open Source Project -# Copyright (C) 2015 Valve Corporation - -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at - -# http://www.apache.org/licenses/LICENSE-2.0 - -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -LOCAL_PATH := $(abspath $(call my-dir)) -SRC_DIR := $(LOCAL_PATH)/../../.. -VULKANINFO_DIR := $(SRC_DIR)/vulkaninfo - -include $(CLEAR_VARS) -LOCAL_MODULE := vulkaninfo -LOCAL_SRC_FILES += $(VULKANINFO_DIR)/vulkaninfo.cpp -LOCAL_C_INCLUDES += $(SRC_DIR)/build-android/third_party/Vulkan-Headers/include \ - $(VULKANINFO_DIR) \ - $(VULKANINFO_DIR)/generated -LOCAL_CFLAGS += -DVK_USE_PLATFORM_ANDROID_KHR -DVK_ENABLE_BETA_EXTENSIONS -LOCAL_LDLIBS := -llog -landroid -include $(BUILD_EXECUTABLE) diff --git a/vulkaninfo/android/jni/Application.mk b/vulkaninfo/android/jni/Application.mk deleted file mode 100644 index c294bc5a..00000000 --- a/vulkaninfo/android/jni/Application.mk +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright 2015 The Android Open Source Project -# Copyright (C) 2015 Valve Corporation - -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at - -# http://www.apache.org/licenses/LICENSE-2.0 - -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -APP_ABI := armeabi-v7a arm64-v8a x86 x86_64 -APP_PLATFORM := android-23 -APP_STL := c++_static -APP_MODULES := vulkaninfo -APP_CPPFLAGS += -std=c++11 -fexceptions -Wall -Werror -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -APP_CFLAGS += -Wall -Werror -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -NDK_TOOLCHAIN_VERSION := clang |
