mirror of
https://github.com/Kitware/CMake.git
synced 2025-12-31 10:50:16 -06:00
CPack/NuGet: Restore component packaging on Windows
The change from `\` to `/` in commit dade75509f (CPack/NuGet: Fix nuspec
file generation for UNIX-style OS, 2020-12-21, v3.20.0-rc1~243^2) does
not work on Windows. Use `cmake_path` to form a path to an image
directory with preinstalled files.
Fixes: #22489
This commit is contained in:
@@ -332,7 +332,9 @@ endfunction()
|
||||
function(_cpack_nuget_make_files_tag)
|
||||
set(_files)
|
||||
foreach(_comp IN LISTS ARGN)
|
||||
string(APPEND _files " <file src=\"${_comp}/**\" target=\".\" />\n")
|
||||
cmake_path(APPEND _comp "**")
|
||||
cmake_path(NATIVE_PATH _comp _comp)
|
||||
string(APPEND _files " <file src=\"${_comp}\" target=\".\" />\n")
|
||||
endforeach()
|
||||
set(_CPACK_NUGET_FILES_TAG "<files>\n${_files} </files>" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
Reference in New Issue
Block a user