Skip to content

Commit

Permalink
fix(win/cmake): use cmake_path(CONVERT TO_NATIVE_PATH_LIST) (LizardBy…
Browse files Browse the repository at this point in the history
…te#3152)

Co-authored-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
  • Loading branch information
2 people authored and KuleRucket committed Oct 9, 2024
1 parent 58c8b28 commit f35b26e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
cmake_minimum_required(VERSION 3.18)
cmake_minimum_required(VERSION 3.20)
# `CMAKE_CUDA_ARCHITECTURES` requires 3.18
# set_source_files_properties requires 3.18
# `set_source_files_properties` requires 3.18
# `cmake_path(CONVERT ... TO_NATIVE_PATH_LIST ...)` requires 3.20
# todo - set this conditionally

project(Sunshine VERSION 0.0.0
Expand Down
5 changes: 3 additions & 2 deletions cmake/packaging/windows.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@ file(COPY "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/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)
cmake_path(CONVERT "${SUNSHINE_SOURCE_ASSETS_DIR}/windows/assets/shaders"
TO_NATIVE_PATH_LIST shaders_in_build_src_native)
cmake_path(CONVERT "${CMAKE_BINARY_DIR}/assets/shaders" TO_NATIVE_PATH_LIST 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
Expand Down

0 comments on commit f35b26e

Please sign in to comment.