diff options
Diffstat (limited to 'Modules/Internal')
-rw-r--r-- | Modules/Internal/CPack/CPackNuGet.cmake | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/Modules/Internal/CPack/CPackNuGet.cmake b/Modules/Internal/CPack/CPackNuGet.cmake index 82053b2..1f4bcfd 100644 --- a/Modules/Internal/CPack/CPackNuGet.cmake +++ b/Modules/Internal/CPack/CPackNuGet.cmake @@ -230,31 +230,22 @@ function(_cpack_nuget_render_spec) foreach(_dep IN LISTS _deps) _cpack_nuget_debug(" checking dependency `${_dep}`") - string(MAKE_C_IDENTIFIER "${_dep}" _dep_id) - - _cpack_nuget_variable_fallback(_ver DEPENDENCIES_${_dep_id}_VERSION) + _cpack_nuget_variable_fallback(_ver DEPENDENCIES_${_dep}_VERSION) if(NOT _ver) - string(TOUPPER "${_dep_id}" _dep_id) - _cpack_nuget_variable_fallback(_ver DEPENDENCIES_${_dep_id}_VERSION) + string(TOUPPER "${_dep}" _dep_upper) + _cpack_nuget_variable_fallback(_ver DEPENDENCIES_${_dep_upper}_VERSION) endif() 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 |