feat(cmake): use symlink/junction for shaders in build dir (#3013)

This commit is contained in:
ns6089
2024-08-22 16:14:33 +03:00
committed by GitHub
parent 0a6abb76ab
commit 0164be613e
2 changed files with 16 additions and 4 deletions

View File

@@ -2,9 +2,15 @@
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/linux/assets/"
DESTINATION "${SUNSHINE_ASSETS_DIR}")
# copy assets to build directory, for running without install
# copy assets (excluding shaders) to build directory, for running without install
file(COPY "${SUNSHINE_SOURCE_ASSETS_DIR}/linux/assets/"
DESTINATION "${CMAKE_BINARY_DIR}/assets")
DESTINATION "${CMAKE_BINARY_DIR}/assets"
PATTERN "shaders" EXCLUDE)
# use symbolic link for shaders directory
file(CREATE_LINK "${SUNSHINE_SOURCE_ASSETS_DIR}/linux/assets/shaders"
"${CMAKE_BINARY_DIR}/assets/shaders" COPY_ON_ERROR SYMBOLIC)
if(${SUNSHINE_BUILD_APPIMAGE} OR ${SUNSHINE_BUILD_FLATPAK})
install(FILES "${SUNSHINE_SOURCE_ASSETS_DIR}/linux/misc/60-sunshine.rules"
DESTINATION "${SUNSHINE_ASSETS_DIR}/udev/rules.d")