Skip to content

Instantly share code, notes, and snippets.

@stinos
Created December 19, 2015 11:17
Show Gist options
  • Save stinos/05d93f9b89e1cc7d5930 to your computer and use it in GitHub Desktop.
Save stinos/05d93f9b89e1cc7d5930 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="compile" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemDefinitionGroup>
<ClCompile>
<PreprocessorDefinitions>SomeDummyDef</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<!-- If below line is commented, Message text will be 'False'-->
<Import Project="C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.Cpp.mfcDynamic.props" />
<Target Name="TestImport">
<ItemGroup>
<ClCompile Include="somefile"/>
</ItemGroup>
<PropertyGroup>
<HasAfxDll>@(ClCompile->'%(PreprocessorDefinitions)'->Contains('_AFXDLL'))</HasAfxDll>
</PropertyGroup>
<Message Text="$(HasAfxDll)"/>
</Target>
</Project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment