premake / premake-core

Premake
https://premake.github.io/
BSD 3-Clause "New" or "Revised" License
3.13k stars 611 forks source link

Enable nested vsprops #2216

Open theComputeKid opened 1 month ago

theComputeKid commented 1 month ago

vsprops was added in #2112 with the following API:

vsprops {
  Name1 = "value1",
  Name2 = "value2",
}

This is a useful addition. However, nested properties are not allowed, and only one level of properties can be added to the project XML. This change enables nested properties. This is useful for custom tooling/extensions for Visual Studio.

This is not a breaking change for the original behaviour, it only adds nested vsprops:

vsprops {
  Name1 = "value1",
  Name2 = {
     Name3 = "value3"
  }
}

Translating to:

<Name1>Value1</Name1>
<Name2>
  <Name3>Value3</Name3>
</Name2>

While editing the file, I took the opportunity to remove unnecessary harmless extra spaces from a few lines in modules/vstudio/vs2010_vcxproj.lua, my IDE formatted them.