Skip to content

Commit 69a5dd2

Browse files
committed
Use junction for shaders in build dir
1 parent c8d0d2b commit 69a5dd2

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

cmake/packaging/windows.cmake

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,15 @@ install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/misc/gamepad/"
3939
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/assets/"
4040
DESTINATION "${SUNSHINE_ASSETS_DIR}"
4141
COMPONENT assets)
42-
# copy assets to build directory, for running without install
42+
43+
# copy assets (excluding shaders) to build directory, for running without install
4344
file(COPY "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/assets/"
44-
DESTINATION "${CMAKE_BINARY_DIR}/assets")
45+
DESTINATION "${CMAKE_BINARY_DIR}/assets"
46+
PATTERN "shaders" EXCLUDE)
47+
# use junction for shaders directory
48+
file(TO_NATIVE_PATH "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/assets/shaders" shaders_in_build_src_native)
49+
file(TO_NATIVE_PATH "${CMAKE_BINARY_DIR}/assets/shaders" shaders_in_build_dest_native)
50+
execute_process(COMMAND cmd.exe /c mklink /J "${shaders_in_build_dest_native}" "${shaders_in_build_src_native}")
4551

4652
# set(CPACK_NSIS_MUI_HEADERIMAGE "") # TODO: image should be 150x57 bmp
4753
set(CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}\\\\sunshine.ico")

0 commit comments

Comments
 (0)