change output folder for generated files to build dir
This commit is contained in:
@@ -16,7 +16,7 @@ function(SetShaderDependency TARGET SHADER_SRC_FOLDER SHADER_OUTPUT_FOLDER)
|
||||
set(SHADER_EXPECTED_OUTPUT ${OUTPUT_HEADERS} ${OUTPUT_SOURCES})
|
||||
|
||||
add_custom_command(OUTPUT ${SHADER_EXPECTED_OUTPUT}
|
||||
COMMAND ${CMAKE_COMMAND} -DROOT_FOLDER=${CMAKE_SOURCE_DIR} -P ${CMAKE_BINARY_DIR}/TryCompileShaders.cmake
|
||||
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_BINARY_DIR}/TryCompileShaders.cmake
|
||||
DEPENDS ${SHADER_SRC_FILES}
|
||||
COMMENT "Recompiling shaders")
|
||||
add_custom_target(RecompileShaders ALL
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
execute_process(COMMAND "@BASH_EXECUTABLE@" CompileShaders.sh WORKING_DIRECTORY "@ROOT_FOLDER@/Scripts" RESULT_VARIABLE res_var)
|
||||
execute_process(COMMAND "@BASH_EXECUTABLE@" CompileShaders.sh "@SHADER_OUTPUT_DEST@"
|
||||
WORKING_DIRECTORY "@ROOT_FOLDER@/Scripts"
|
||||
RESULT_VARIABLE res_var)
|
||||
if(NOT "${res_var}" STREQUAL "0")
|
||||
message(FATAL_ERROR "Failed to recompile shaders")
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user