Stop hardcoding binary dirs in CMakeLists.txt
This commit is contained in:
parent
5935f0fcef
commit
519b0d0141
1 changed files with 2 additions and 2 deletions
|
@ -22,7 +22,7 @@ target_include_directories(Graph PUBLIC include ${Vulkan_INCLUDE_DIRS})
|
|||
macro(compile_shader src)
|
||||
add_custom_command(
|
||||
OUTPUT ${src}.spv
|
||||
COMMAND glslangValidator -V ${CMAKE_CURRENT_SOURCE_DIR}/shaders/${src} -o ${CMAKE_CURRENT_SOURCE_DIR}/build/${src}.spv
|
||||
COMMAND glslangValidator -V ${CMAKE_CURRENT_SOURCE_DIR}/shaders/${src} -o ${CMAKE_CURRENT_BINARY_DIR}/${src}.spv
|
||||
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/shaders/${src}
|
||||
)
|
||||
|
||||
|
@ -35,4 +35,4 @@ compile_shader(triangle.frag)
|
|||
add_custom_target(BuildShaders DEPENDS ${SPV_FILES})
|
||||
add_dependencies(Graph BuildShaders)
|
||||
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/data/suzanne.obj ${CMAKE_CURRENT_SOURCE_DIR}/build/suzanne.obj COPYONLY)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/data/suzanne.obj ${CMAKE_CURRENT_BINARY_DIR}/suzanne.obj COPYONLY)
|
||||
|
|
Reference in a new issue