summaryrefslogtreecommitdiff
path: root/platform/android
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-10-31 14:29:05 +0100
committerRémi Verschelde <rverschelde@gmail.com>2022-10-31 14:29:05 +0100
commit9188bc734155e14c97e24649a22213b625b9b6cf (patch)
tree993d3951ef28137ec0284e703356e090e89b73fd /platform/android
parentcd25e48456e58704f1450954a0c94b1e7fe079f4 (diff)
parent4dd8f68120bc3d3be94e0556ccfef9ee4bf8311a (diff)
Merge pull request #67879 from bruvzg/fix_no_vlk
Fix build with Vulkan disabled and no Vulkan headers installed.
Diffstat (limited to 'platform/android')
-rw-r--r--platform/android/vulkan/vulkan_context_android.cpp4
-rw-r--r--platform/android/vulkan/vulkan_context_android.h4
2 files changed, 8 insertions, 0 deletions
diff --git a/platform/android/vulkan/vulkan_context_android.cpp b/platform/android/vulkan/vulkan_context_android.cpp
index c802c9840b..948292c3af 100644
--- a/platform/android/vulkan/vulkan_context_android.cpp
+++ b/platform/android/vulkan/vulkan_context_android.cpp
@@ -28,6 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
+#ifdef VULKAN_ENABLED
+
#include "vulkan_context_android.h"
#ifdef USE_VOLK
@@ -63,3 +65,5 @@ bool VulkanContextAndroid::_use_validation_layers() {
// On Android, we use validation layers automatically if they were explicitly linked with the app.
return count > 0;
}
+
+#endif // VULKAN_ENABLED
diff --git a/platform/android/vulkan/vulkan_context_android.h b/platform/android/vulkan/vulkan_context_android.h
index ca8182e9cd..fe9a033e1c 100644
--- a/platform/android/vulkan/vulkan_context_android.h
+++ b/platform/android/vulkan/vulkan_context_android.h
@@ -31,6 +31,8 @@
#ifndef VULKAN_CONTEXT_ANDROID_H
#define VULKAN_CONTEXT_ANDROID_H
+#ifdef VULKAN_ENABLED
+
#include "drivers/vulkan/vulkan_context.h"
struct ANativeWindow;
@@ -48,4 +50,6 @@ protected:
bool _use_validation_layers() override;
};
+#endif // VULKAN_ENABLED
+
#endif // VULKAN_CONTEXT_ANDROID_H