Skip to content

Commit 71619de

Browse files
committed
cmake: rust: Add header dependencies to cargo
With bindgen needing to read the headers, make sure CMake knows about this. Signed-off-by: David Brown <[email protected]>
1 parent 389c78d commit 71619de

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cmake/modules/rust.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,13 @@ ${config_paths}
168168
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
169169
)
170170

171+
# Be sure we don't try building this until al of the generated headers have been generated.
171172
add_custom_target(librustapp ALL
172173
DEPENDS ${DUMMY_FILE}
174+
# The variables, defined at the top level, don't seem to be accessible here.
175+
syscall_list_h_target
176+
driver_validation_h_target
177+
kobj_types_h_target
173178
)
174179

175180
target_link_libraries(app PUBLIC -Wl,--allow-multiple-definition ${RUST_LIBRARY})

0 commit comments

Comments
 (0)