Skip to content

Instantly share code, notes, and snippets.

@devhawk
Last active February 17, 2016 15:50
Show Gist options
  • Save devhawk/8d4d83bdbb98859fde5a to your computer and use it in GitHub Desktop.
Save devhawk/8d4d83bdbb98859fde5a to your computer and use it in GitHub Desktop.
Fix VC++ broken build folder structure
<!-- Add to .vcxproj file after line importing $(VCTargetsPath)\Microsoft.Cpp.props to have sensible build output folders -->
<!-- have VC++ emit build artifacts into \bin and \obj folders like managed proejcts do -->
<PropertyGroup>
<!--
The VC++ build scripts automatically appends atrailing slash on OutDir, which annoys some tools,
so I added OutputDirectory w/o the slash. Also, I'm using "PlatformShortName" so x86 binaries don't
end up in the "win32" directory
-->
<OutputDirectory>$(ProjectDir)\bin\$(PlatformShortName)\$(Configuration)</OutputDirectory>
<OutDir>$(OutputDirectory)\</OutDir>
<IntDir>$(ProjectDir)\obj\$(PlatformShortName)\$(Configuration)\</IntDir>
<!-- for projects that do codegen w/ MIDL, you can generate the files into the GenDir folder -->
<GenDir>$(ProjectDir)\$(GeneratedFilesDir)$(PlatformShortName)\</GenDir>
</PropertyGroup>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment