Chris
Chris

Reputation: 21

How can I change the compiling dir of hlsl files using CMAKE?

I am using CMake 3.9.1, and I am already changing my project RUNTIME_OUTPUT_DIRECTORY to a different folder.

However, I want to change the output of hlsl files(cso).

Upvotes: 1

Views: 550

Answers (1)

Chris
Chris

Reputation: 21

The following works for CMAKE 3.9.1 visual studio

add_custom_command(TARGET ${projectName} POST_BUILD COMMAND cmd /c ${PROJECT_CONFIGURATION}/shadercopy.bat)

It will run the .bat right after visual studio builds the project and right before it executes!

Upvotes: 1

Related Questions