demos: Add dependency for SPIRV shader components
authorCourtney Goeltzenleuchter <courtney@LunarG.com>
Wed, 29 Jul 2015 15:07:01 +0000 (09:07 -0600)
committerCourtney Goeltzenleuchter <courtney@LunarG.com>
Wed, 29 Jul 2015 17:08:04 +0000 (11:08 -0600)
Occasional saw issues with parallel make because dependency
was not specified for the shader SPIRV components used by tri
and cube.

demos/CMakeLists.txt

index b9d1a3788d18478802ee407832645cd438d0df48..f6ef2863905e996ca0a2dca0e4fd7da628c00bf5 100644 (file)
@@ -122,6 +122,8 @@ if(UNIX)
 else()
     add_executable(tri WIN32 tri.c ${CMAKE_BINARY_DIR}/demos/tri-vert.spv ${CMAKE_BINARY_DIR}/demos/tri-frag.spv)
 endif()
+add_dependencies(tri ${CMAKE_BINARY_DIR}/demos/tri-vert.spv
+                     ${CMAKE_BINARY_DIR}/demos/tri-frag.spv)
 target_link_libraries(tri ${LIBRARIES})
 
 if(NOT WIN32)
@@ -138,5 +140,7 @@ else()
     add_library(zlibd STATIC IMPORTED)
     set_target_properties(zlibd PROPERTIES IMPORTED_LOCATION ${PROJECT_SOURCE_DIR}/libs/${LIB_DIR}/zlibd.lib)
     add_executable(cube WIN32 cube.c ${CMAKE_BINARY_DIR}/demos/cube-vert.spv ${CMAKE_BINARY_DIR}/demos/cube-frag.spv)
+    add_dependencies(cube ${CMAKE_BINARY_DIR}/demos/cube-vert.spv
+                          ${CMAKE_BINARY_DIR}/demos/cube-frag.spv)
     target_link_libraries(cube ${LIBRARIES} libpngd zlibd)
 endif()