From fa654c12ef93dc2606de529c3c1a423bd9f8c9af Mon Sep 17 00:00:00 2001 From: ns6089 <61738816+ns6089@users.noreply.github.com> Date: Tue, 1 Oct 2024 00:40:46 +0300 Subject: [PATCH] fix(win/cmake): use cmake_path(CONVERT TO_NATIVE_PATH_LIST) (#3152) Co-authored-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com> --- CMakeLists.txt | 5 +++-- cmake/packaging/windows.cmake | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 90822a36..ea145ced 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 diff --git a/cmake/packaging/windows.cmake b/cmake/packaging/windows.cmake index e17c971a..f8df493d 100644 --- a/cmake/packaging/windows.cmake +++ b/cmake/packaging/windows.cmake @@ -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