GENie
GENie copied to clipboard
exclude from Unity Build option (VS2019)
With Unity(Jumbo) builds support in VS2019 out of the box there's also a new option to exclude files from those builds, still present for compiling but excluded from the Jumbo build and compiled the "regular" way to avoid name clashes etc. This can happen with some third party libs, ran into that issue with IMGui for example. Excluding from Unity does the trick,
The option is in the item properties and the tag is similar to the exclude build.
<ClCompile Include="..\..\imgui\examples\imgui_impl_opengl3.cpp">
<IncludeInUnityFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</IncludeInUnityFile>
</ClCompile>
For comparison the exclude from build
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
I was researching into adding this to GENie myself but wanted to discuss the least intrusive way of doing so if possible. Thanks
@rhoot Might have opinion about this one.
It'd probably be good to support the feature in its entirety, rather than picking out individual properties to add. If it helps someone get a jump on it, here are all the related vcxproj elements, with their default values:
In the project's "Configuration" PropertyGroup
block:
<EnableUnitySupport>true</EnableUnitySupport>
In the project's or each file's ClCompile
block:
<IncludeInUnityFile>true</IncludeInUnityFile>
<OrderInUnityFile>100</OrderInUnityFile>
<CombineFilesOnlyFromTheSameFolder>false</CombineFilesOnlyFromTheSameFolder>
<MinFilesInUnityFile>2</MinFilesInUnityFile>
<MaxFilesInUnityFile>0</MaxFilesInUnityFile>
<MinUnityFiles>1</MinUnityFiles>
<AddCodeBeforeSourceInclude></AddCodeBeforeSourceInclude>
<AddCodeAfterSourceInclude></AddCodeAfterSourceInclude>
<AddCodeBeforeSourceIncludeFromFile></AddCodeBeforeSourceIncludeFromFile>
<AddCodeAfterSourceIncludeFromFile></AddCodeAfterSourceIncludeFromFile>
<UnityFilesDirectory>$(IntDir)</UnityFilesDirectory>
<CustomUnityFile>false</CustomUnityFile>