diff options
-rw-r--r-- | Modules/Internal/CPack/CPackNuGet.cmake | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/Modules/Internal/CPack/CPackNuGet.cmake b/Modules/Internal/CPack/CPackNuGet.cmake index b46a7b1..1f4bcfd 100644 --- a/Modules/Internal/CPack/CPackNuGet.cmake +++ b/Modules/Internal/CPack/CPackNuGet.cmake @@ -239,20 +239,13 @@ function(_cpack_nuget_render_spec) if(_ver) _cpack_nuget_debug(" got `${_dep}` dependency version ${_ver}") - list(APPEND _collected_deps "<dependency id=\"${_dep}\" version=\"${_ver}\" />") + string(CONCAT _collected_deps "${_collected_deps}" " <dependency id=\"${_dep}\" version=\"${_ver}\" />\n") endif() endforeach() # Render deps into the variable if(_collected_deps) - set(_CPACK_NUGET_DEPENDENCIES_TAG "<dependencies>\n") - foreach(_line IN LISTS _collected_deps) - string( - APPEND _CPACK_NUGET_DEPENDENCIES_TAG - " ${_line}\n" - ) - endforeach() - string(APPEND _CPACK_NUGET_DEPENDENCIES_TAG " </dependencies>") + string(CONCAT _CPACK_NUGET_DEPENDENCIES_TAG "<dependencies>\n" "${_collected_deps}" " </dependencies>") endif() # Render the spec file |