From fbc76714f57a801a666cdbb98e255c2169c550e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Thu, 20 Oct 2022 15:46:41 +0800 Subject: [PATCH] Android: add vulkan support for GPU detection Termux does have package pciutils, but it's put inside of root-repo and and doesn't provide libpci.pc. So I think use vulkan can be a better option than libpci because vulkan.so is provided by Android system. To build with android support, install `vulkan-headers` and `vulkan-loader-android` (for `vulkan.pc`). --- CMakeLists.txt | 2 +- README.md | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 78bbf0d33..2276a01fa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,7 +41,7 @@ include(CheckIncludeFile) include(CMakeDependentOption) cmake_dependent_option(ENABLE_LIBPCI "Enable libpci" ON "LINUX OR BSD" OFF) -cmake_dependent_option(ENABLE_VULKAN "Enable vulkan" ON "LINUX OR APPLE OR BSD OR WIN32" OFF) +cmake_dependent_option(ENABLE_VULKAN "Enable vulkan" ON "LINUX OR APPLE OR BSD OR WIN32 OR ANDROID" OFF) cmake_dependent_option(ENABLE_WAYLAND "Enable wayland-client" ON "LINUX OR BSD" OFF) cmake_dependent_option(ENABLE_XCB_RANDR "Enable xcb-randr" ON "LINUX OR BSD" OFF) cmake_dependent_option(ENABLE_XCB "Enable xcb" ON "LINUX OR BSD" OFF) diff --git a/README.md b/README.md index 76e026e01..df0d96a52 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ The following libraries are used if present at runtime: ### macOS * [`MediaRemote`](https://iphonedev.wiki/index.php/MediaRemote.framework): Need for Media detection. It's a private framework provided by newer macOS system. -* [`libvulkan`](https://www.vulkan.org/): Vulkan module. To get it actually working, both loader (`vulkan-loader`) and driver (molten-vk) need to be installed. +* [`libvulkan`](https://www.vulkan.org/): Vulkan module. To get it actually working, both loader (`vulkan-loader`) and driver (`molten-vk`) need to be installed. ### Windows @@ -64,6 +64,7 @@ The following libraries are used if present at runtime: ### Android * [`freetype`](https://www.freetype.org/): Used for Termux font detection. +* [`libvulkan`](https://www.vulkan.org/): Vulkan module, also used for GPU detection. Usually has been provided by Android system. ## Support status All categories not listed here should work without needing a specific implementation.