<div dir="ltr">Yes, CMake documentation is one of the worst. You should look for "cmake add_custom_command example", one of the first hits is <a href="https://stackoverflow.com/questions/13470499/cmake-add-custom-command-with-dependencies-from-a-different-directory">this</a>.</div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">Dženan Zukić, PhD, Senior R&D Engineer,<span style="font-size:12.8000001907349px"> </span>Kitware (Carrboro, N.C.)</div></div></div></div></div></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On Wed, Aug 9, 2017 at 5:42 PM, Milef, Nicholas Boris <span dir="ltr"><<a href="mailto:milefn@rpi.edu" target="_blank">milefn@rpi.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div style="direction:ltr;font-family:Tahoma;color:#000000;font-size:10pt">Actually, how would I use this command? Would I attach this to the target, or should I run the .exe separately?
<div><br>
</div>
<div>I'm kind of confused by the documentation.<br>
<div style="font-family:Times New Roman;color:#000000;font-size:16px">
<hr>
<div id="m_-5494767028040491296divRpF402531" style="direction:ltr"><font face="Tahoma" size="2" color="#000000"><b>From:</b> Imstk-developers [<a href="mailto:imstk-developers-bounces@imstk.org" target="_blank">imstk-developers-bounces@<wbr>imstk.org</a>] on behalf of Milef, Nicholas Boris [<a href="mailto:milefn@rpi.edu" target="_blank">milefn@rpi.edu</a>]<br>
<b>Sent:</b> Wednesday, August 09, 2017 4:17 PM<br>
<b>To:</b> Dzenan Zukic<span class=""><br>
<b>Cc:</b> <a href="mailto:imstk-developers@imstk.org" target="_blank">imstk-developers@imstk.org</a><br>
<b>Subject:</b> Re: [Imstk-developers] How to compile shader code in CMake?<br>
</span></font><br>
</div><span class="">
<div></div>
<div>
<div style="direction:ltr;font-family:Tahoma;color:#000000;font-size:10pt">Great! Thanks Dzenan!
<div style="font-family:Times New Roman;color:#000000;font-size:16px">
<hr>
<div id="m_-5494767028040491296divRpF484050" style="direction:ltr"><font face="Tahoma" size="2" color="#000000"><b>From:</b> Dzenan Zukic [<a href="mailto:dzenan.zukic@kitware.com" target="_blank">dzenan.zukic@kitware.com</a>]<br>
<b>Sent:</b> Wednesday, August 09, 2017 4:13 PM<br>
<b>To:</b> Milef, Nicholas Boris<br>
<b>Cc:</b> <a href="mailto:imstk-developers@imstk.org" target="_blank">imstk-developers@imstk.org</a><br>
<b>Subject:</b> Re: [Imstk-developers] How to compile shader code in CMake?<br>
</font><br>
</div>
<div></div>
<div>
<div dir="ltr">You can add custom command:
<div><a href="https://cmake.org/cmake/help/v3.0/command/add_custom_command.html" target="_blank">https://cmake.org/cmake/help/<wbr>v3.0/command/add_custom_<wbr>command.html</a><br>
</div>
</div>
<div class="gmail_extra"><br clear="all">
<div>
<div class="m_-5494767028040491296gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">Dženan Zukić, PhD, Senior R&D Engineer,<span style="font-size:12.8000001907349px"> </span>Kitware (Carrboro, N.C.)</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<div class="gmail_quote">On Wed, Aug 9, 2017 at 4:09 PM, Milef, Nicholas Boris <span dir="ltr">
<<a href="mailto:milefn@rpi.edu" target="_blank">milefn@rpi.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div style="direction:ltr;font-family:Tahoma;color:#000000;font-size:10pt">I need to compile the Vulkan shaders (from GLSL to SPIR-V) and I don't really want to add the SPIR-V shaders in the repo because they're binary (although they aren't very large).
<div><br>
</div>
<div>From command prompt, I run this (included with VulkanSDK):</div>
<div>glslangvalidator -V mesh_frag.frag -o mesh_frag.spv</div>
<div><br>
</div>
<div>Any ideas on how to do this?</div>
</div>
</div>
<br>
______________________________<wbr>_________________<br>
Imstk-developers mailing list<br>
<a href="mailto:Imstk-developers@imstk.org" target="_blank">Imstk-developers@imstk.org</a><br>
<a href="http://public.kitware.com/mailman/listinfo/imstk-developers" rel="noreferrer" target="_blank">http://public.kitware.com/mail<wbr>man/listinfo/imstk-developers</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</div>
</div>
</span></div>
</div>
</div>
</div>
</blockquote></div><br></div>