I would have expected the following snippet of msbuild to work at the bottom of my .vcxproj files:
<ItemDefinitionGroup>
<ClCompile>
<PreprocessorDefinitions Condition='%(Link.SubSystem)'=='Windows'>SomethingWinSpecific;%(PreprocessorDefinitions)
</ClCompile>
</ItemDefinitionGroup>
except no matter what I do %(Link.SubSystem)
is empty. I even printed out its value in various targets throughout a build and it appears to remain empty until the Link step begins. So my question is开发者_Go百科, is there any way to access the value of Link.SubSystem before the Compile step?
Link.SubSystem distinquishes between a Windows app and Console App, so Platform will not work.
精彩评论