Skip to contentSkip to conversation

vulkan-loader: alternative link for qt demos

PATCH New [email protected] 1 participant 1 message Jul 13, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vulkan-loader: alternative link for qt demos

From: Randolph Sapp <[email protected]>

Some applications, like Qt's Vulkan demos, require the libvulkan.so devlink to point at a valid Vulkan ICD loader. OE-Core has one that we use so let's just use the alternative hooks to make sure that devlink gets created without stomping on anything else.

To be dropped if upstream adopts something like this.

---
 .../recipes-graphics/vulkan/vulkan-loader_%.bbappend   | 10 ++++++++++
 1 file changed, 10 insertions(+)
 create mode 100644 meta-arago-distro/recipes-graphics/vulkan/vulkan-loader_%.bbappend
meta-arago-distro/recipes-graphics/vulkan/vulkan-loader_%.bbappend new file +10 -0
new file mode 100644
index 00000000..67ece316
@@ -0,0 +1,10 @@
+# Set alternative link for applications like Qt that really need
+# ${libdir}/libvulkan.so to point to an actual ICD loader instead of using
+# libvulkan.so.1
+
+inherit update-alternatives
+
+ALTERNATIVE_PRIORITY = "10"
+ALTERNATIVE:${PN} = "vulkan-loader"
+ALTERNATIVE_LINK_NAME[vulkan-loader] = "${libdir}/libvulkan.so"
+ALTERNATIVE_TARGET[vulkan-loader] = "libvulkan.so.1"
Signature · 1 line
2.41.0