From 066ff258dbea32cda233109910606c617fedc59f Mon Sep 17 00:00:00 2001 From: Alex Turbov Date: Wed, 18 May 2022 18:36:14 +0400 Subject: 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 --- Modules/Internal/CPack/CPackNuGet.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Modules/Internal/CPack/CPackNuGet.cmake b/Modules/Internal/CPack/CPackNuGet.cmake index fb363f4..056d025 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 " \n") + cmake_path(APPEND _comp "**") + cmake_path(NATIVE_PATH _comp _comp) + string(APPEND _files " \n") endforeach() set(_CPACK_NUGET_FILES_TAG "\n${_files} " PARENT_SCOPE) endfunction() -- cgit v0.12