summaryrefslogtreecommitdiff
path: root/Modules/Internal
diff options
context:
space:
mode:
authorAlex Turbov <i.zaufi@gmail.com>2022-05-18 18:36:14 +0400
committerBrad King <brad.king@kitware.com>2022-05-18 11:12:02 -0400
commit066ff258dbea32cda233109910606c617fedc59f (patch)
treeae2a30b792038d4e65884c06bc0dee4fd0283a85 /Modules/Internal
parent640268c19b64d3063370872a13d267ef497139ee (diff)
downloadcmake-066ff258dbea32cda233109910606c617fedc59f.tar.gz
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
Diffstat (limited to 'Modules/Internal')
-rw-r--r--Modules/Internal/CPack/CPackNuGet.cmake4
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/Internal/CPack/CPackNuGet.cmake b/Modules/Internal/CPack/CPackNuGet.cmake
index fb363f4489..056d025ed6 100644
--- a/Modules/Internal/CPack/CPackNuGet.cmake
+++ b/Modules/Internal/CPack/CPackNuGet.cmake
@@ -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()