[Imstk-developers] How to compile shader code in CMake?

Dzenan Zukic dzenan.zukic at kitware.com
Wed Aug 9 22:13:56 EDT 2017


Yes, CMake documentation is one of the worst. You should look for "cmake
add_custom_command example", one of the first hits is this
<https://stackoverflow.com/questions/13470499/cmake-add-custom-command-with-dependencies-from-a-different-directory>
.

Dženan Zukić, PhD, Senior R&D Engineer, Kitware (Carrboro, N.C.)

On Wed, Aug 9, 2017 at 5:42 PM, Milef, Nicholas Boris <milefn at rpi.edu>
wrote:

> Actually, how would I use this command? Would I attach this to the target,
> or should I run the .exe separately?
>
> I'm kind of confused by the documentation.
> ------------------------------
> *From:* Imstk-developers [imstk-developers-bounces at imstk.org] on behalf
> of Milef, Nicholas Boris [milefn at rpi.edu]
> *Sent:* Wednesday, August 09, 2017 4:17 PM
> *To:* Dzenan Zukic
> *Cc:* imstk-developers at imstk.org
> *Subject:* Re: [Imstk-developers] How to compile shader code in CMake?
>
> Great! Thanks Dzenan!
> ------------------------------
> *From:* Dzenan Zukic [dzenan.zukic at kitware.com]
> *Sent:* Wednesday, August 09, 2017 4:13 PM
> *To:* Milef, Nicholas Boris
> *Cc:* imstk-developers at imstk.org
> *Subject:* Re: [Imstk-developers] How to compile shader code in CMake?
>
> You can add custom command:
> https://cmake.org/cmake/help/v3.0/command/add_custom_command.html
>
> Dženan Zukić, PhD, Senior R&D Engineer, Kitware (Carrboro, N.C.)
>
> On Wed, Aug 9, 2017 at 4:09 PM, Milef, Nicholas Boris <milefn at rpi.edu>
> wrote:
>
>> 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).
>>
>> From command prompt, I run this (included with VulkanSDK):
>> glslangvalidator -V mesh_frag.frag -o mesh_frag.spv
>>
>> Any ideas on how to do this?
>>
>> _______________________________________________
>> Imstk-developers mailing list
>> Imstk-developers at imstk.org
>> http://public.kitware.com/mailman/listinfo/imstk-developers
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/imstk-developers/attachments/20170809/7bc17fbb/attachment-0001.html>


More information about the Imstk-developers mailing list