Skip to content

Conversation

@Le-Syl21
Copy link

Summary

Fix slang-shaders being installed in an extra subdirectory on Linux.

install(DIRECTORY "${slang_shaders_LOCATION}" ...) without a trailing slash copies the directory itself, creating Shaders/shaders_slang/ instead of putting the shader files directly in Shaders/.

Adding a trailing slash ("${slang_shaders_LOCATION}/") makes CMake copy the contents, which is consistent with macOS and Windows:

Platform Command Behavior
macOS ditto "${slang_shaders_LOCATION}" ".../Shaders/" Copies contents
Windows copy_directory "${slang_shaders_LOCATION}" ".../Shaders/" Copies contents
Linux (before) install(DIRECTORY "${slang_shaders_LOCATION}" ...) Copies directory itself
Linux (after) install(DIRECTORY "${slang_shaders_LOCATION}/" ...) Copies contents

Change

One character added: a trailing / in desktop-ui/cmake/os-linux.cmake line 21.

Test plan

  • Verified shaders end up directly in Shaders/ instead of Shaders/shaders_slang/
  • Tested via Snap package build and runtime shader selection in ares UI

CMake install(DIRECTORY "path") without a trailing slash copies the
directory itself, creating an extra shaders_slang/ level under Shaders/.

Adding a trailing slash makes it copy the contents directly, consistent
with macOS (ditto) and Windows (copy_directory) which both copy contents.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant