Get rid of CMake Rules folder
<p>Is there a way to get rid of the <code>CMake Rules</code> folders in targets in Visual Studio?</p>

<p><img src="https://i.imgur.com/hO52aoP.png" alt="solution explorer"></p>

<p>In this case the <code>game</code> target uses <a href="https://github.com/sakra/cotire" rel="nofollow noreferrer">cotire</a> for precompiled header support and the <code>omg</code> target has a custom command that parses the <code>.mix</code> file and outputs the <code>..._gen.h</code> file.</p>

<p>Also would it be possible to remove the <code>CMakeLists.txt</code> file from there too? I know it's there for convenience but in my workflow it isn't that useful.</p>

<p><strong>EDIT:</strong> Started a second bounty because I really need this - these "CMake Rules" folders are bloating my solution explorer because I have 100+ projects which all have them!</p>

<p>I would accept anything - a CMake way, a VS way (some "solution explorer view" or macro or whatever)...</p>

<p><strong>EDIT 2:</strong></p>

<p>here is sort-of the cmake for the <code>omg</code> target:</p>

<pre><code>add_library(omg SHARED D:/omg.cpp D:/omg.mix)
add_custom_command(OUTPUT D:/omg_gen.h MAIN_DEPENDENCY D:/omg.mix COMMAND python D:/mixify.py D:/omg.mix D:/omg_gen.h)
add_custom_target(${target}_gen_${mix_name_only} DEPENDS ${gen_header})
add_dependencies(omg omg_gen)
target_sources(omg PUBLIC D:/omg_gen.h)
</code></pre>

<p>so <code>omg_gen.h</code> is generated from <code>omg.mix</code> and then included in <code>omg.cpp</code></p>