Hi, I’m trying to build a C++ project that uses Cmake and Vulkan.
The standard way to find vulkan across platform in Cmake is to include the find_vulkan.cmake module. Code for the module here.
From the source code, it works by checking the “VULKAN_SDK” environment variable and expects the lib/bin/include folders to be there.
I know I can use
environment.variables.VULKAN_SDK = "directoryhere"; to set the environment variable, but the vulkan sdk is split over many packages. (vulkan-headers, vulkan-tools, vulkan-tools-lunarg, vulkan-loader, vulkan-validation-layers, vulkan-extension-layer, glslang)
For example, I want both vulkan-tools and vulkan-tools-lunarg (both have their own bin directory, so sadly a simple symlink wont work) to be in the one VULKAN_SDK directory.
I’m guessing the best thing to do would be to somehow copy all the packages into one directory, then set an environment variable there? This is just my second day using NixOS, I don’t know the best way to go about this.