Skip to content

Commit

Permalink
cmake/add_obx_schema: added dependency chain
Browse files Browse the repository at this point in the history
  • Loading branch information
dan-obx committed Aug 15, 2024
1 parent b48a514 commit f96339c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cmake/FindObjectBoxGenerator.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -365,10 +365,16 @@ function (add_obx_schema)
${schema_filepath}
DEPENDS
${schema_filepath}
USES_TERMINAL # Needed for ninja
)
set(custom_target gen-${ARG_TARGET}-${basefile})
add_custom_target(${custom_target} DEPENDS ${cppfile} ${hppfile})
if(previous_custom_target)
add_dependencies(${custom_target} ${previous_custom_target})
endif()
set(previous_custom_target ${custom_target})
list(APPEND sources ${cppfile} ${hppfile})
endforeach()
add_dependencies(${ARG_TARGET} ${previous_custom_target})

target_sources(${ARG_TARGET} PRIVATE ${sources})
if (NOT ARG_INSOURCE)
Expand Down

0 comments on commit f96339c

Please sign in to comment.