depot/third_party/nixpkgs/pkgs/development/compilers/cudatoolkit/auto-add-opengl-runpath-hook.sh
Default email bb584b27e9 Project import generated by Copybara.
GitOrigin-RevId: 5181d5945eda382ff6a9ca3e072ed6ea9b547fee
2022-04-15 03:41:22 +02:00

14 lines
390 B
Bash

# Run autoOpenGLRunpath on all files
echo "Sourcing auto-add-opengl-runpath-hook"
autoAddOpenGLRunpathPhase () {
# TODO: support multiple outputs
for file in $(find ${out,lib,bin} -type f); do
addOpenGLRunpath $file
done
}
if [ -z "${dontUseAutoAddOpenGLRunpath-}" ]; then
echo "Using autoAddOpenGLRunpathPhase"
postFixupHooks+=(autoAddOpenGLRunpathPhase)
fi