Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes running examples from generated SLN (shader-slang#4173)
* Fixes running examples from generated SLN This CL contains changes to CMakeLists.txt that enables the examples to run from within Visual Studio when using CMake generated solution. Previously the working directory was set to examples/<example name> and which resulted in an invalid path in the generated project files. Additionally, the assets (shaders, images, models) were not in location that was accessible to the executable when ran from within Visual Studio. - Changed examples to use ${CMAKE_BINARY_DIR}/${dir} instead of ${dir} if generator is MSVC. - Add custom target to assets (shaders, images, models, etc) to example subdir under ${CMAKE_BINARY_DIR} - Add dependency to copy prebuilt binaries if building examples in MSVC so DirectX shader signing doesn't fail - Changed copy-prebuilt-binaries to use copy_if_different to avoid redundant copies The initial build time is increased by 20 seconds (16%) from 2m3s to 2m23s, due to the asset copy. The incremental build time remained same at 4 seconds. * Corrected tabs to spaces Corrected unintentional use of tabs instead of spaces. --------- Co-authored-by: Jay Kwak <[email protected]> Co-authored-by: Yong He <[email protected]>
- Loading branch information