The LunarG installation script (macOS) copies the vulkan dylibs to /usr/local/lib.
By adding this directory to the RPATH entries of the vulkan dylib built from this component, we can save a lot of headaches (ie loader errors) for macOS users for whom that path is not part of the default RPATH entries. This is justified by this being the default installation path of the vulkan SDK on macOS.
More specifically, vulkan-utils uses template haskell which forces the vulkan library to be loaded at compile time, resulting in an especially hard to diagnose loader error that is harder to fix than correcting the rpath of an executable (#501). This fixes that error for LunarG vulkan installations.
The caveat is that this fix is predicated on a Cabal bug being fixed: This will only work from Cabal 3.10.3+ (after cabal#9554 lands).
The LunarG installation script (macOS) copies the vulkan dylibs to /usr/local/lib.
By adding this directory to the RPATH entries of the vulkan dylib built from this component, we can save a lot of headaches (ie loader errors) for macOS users for whom that path is not part of the default RPATH entries. This is justified by this being the default installation path of the vulkan SDK on macOS.
More specifically, vulkan-utils uses template haskell which forces the vulkan library to be loaded at compile time, resulting in an especially hard to diagnose loader error that is harder to fix than correcting the rpath of an executable (#501). This fixes that error for LunarG vulkan installations.
The caveat is that this fix is predicated on a Cabal bug being fixed: This will only work from Cabal 3.10.3+ (after cabal#9554 lands).
Fixes #501.