package/flutter-pi: enable vulkan if possible

Enable the flutter-pi vulkan option if a suitable driver is enabled.
Currently, only Mesa provides Vulkan drivers. As such, gating the
feature behind the BR2_PACKAGE_MESA3D_VULKAN_DRIVER option is
reasonable at the moment and is done by three other packages already:
flutter-engine, ivi-home screen, and wlroots.

Furthermore, a dependency on BR2_PACKAGE_VULKAN_LOADER is needed as the
vulkan-loader package provides the vulkan.pc file, which the configure step
relies upon.

Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
Adam Duskett 2024-01-21 13:57:18 -07:00 committed by Thomas Petazzoni
parent 282b951ed3
commit a627753d35

View File

@ -24,7 +24,6 @@ FLUTTER_PI_CONF_OPTS = \
-DENABLE_TESTS=OFF \
-DENABLE_TSAN=OFF \
-DENABLE_UBSAN=OFF \
-DENABLE_VULKAN=OFF \
-DFILESYSTEM_LAYOUT=meta-flutter \
-DLINT_EGL_HEADERS=OFF \
-DTRY_BUILD_GSTREAMER_AUDIO_PLAYER_PLUGIN=OFF \
@ -75,6 +74,13 @@ else
FLUTTER_PI_CONF_OPTS += -DBUILD_TEXT_INPUT_PLUGIN=OFF
endif
ifeq ($(BR2_PACKAGE_MESA3D_VULKAN_DRIVER)$(BR2_PACKAGE_VULKAN_LOADER),yy)
FLUTTER_PI_DEPENDENCIES += mesa3d vulkan-loader
FLUTTER_PI_CONF_OPTS += -DENABLE_VULKAN=ON
else
FLUTTER_PI_CONF_OPTS += -DENABLE_VULKAN=OFF
endif
ifeq ($(BR2_PACKAGE_HAS_LIBGLES),y)
FLUTTER_PI_CONF_OPTS += -DENABLE_OPENGL=ON
else