mirror of
https://github.com/thinkonmay/sunshine-sdk.git
synced 2026-01-01 12:41:57 +00:00
feat(cmake): use symlink/junction for shaders in build dir (#3013)
This commit is contained in:
parent
0a6abb76ab
commit
0164be613e
@ -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")
|
||||
|
||||
@ -39,9 +39,15 @@ install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/misc/gamepad/"
|
||||
install(DIRECTORY "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/assets/"
|
||||
DESTINATION "${SUNSHINE_ASSETS_DIR}"
|
||||
COMPONENT assets)
|
||||
# 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}/windows/assets/"
|
||||
DESTINATION "${CMAKE_BINARY_DIR}/assets")
|
||||
DESTINATION "${CMAKE_BINARY_DIR}/assets"
|
||||
PATTERN "shaders" EXCLUDE)
|
||||
# use junction for shaders directory
|
||||
file(TO_NATIVE_PATH "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/assets/shaders" shaders_in_build_src_native)
|
||||
file(TO_NATIVE_PATH "${CMAKE_BINARY_DIR}/assets/shaders" shaders_in_build_dest_native)
|
||||
execute_process(COMMAND cmd.exe /c mklink /J "${shaders_in_build_dest_native}" "${shaders_in_build_src_native}")
|
||||
|
||||
# set(CPACK_NSIS_MUI_HEADERIMAGE "") # TODO: image should be 150x57 bmp
|
||||
set(CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}\\\\sunshine.ico")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user