Commit 71619dea authored by David Brown's avatar David Brown Committed by David Brown
Browse files

cmake: rust: Add header dependencies to cargo

With bindgen needing to read the headers, make sure CMake knows about
this.

Signed-off-by: default avatarDavid Brown <david.brown@linaro.org>
parent 389c78d5
Loading
Loading
Loading
Loading
+5 −0
Changes for cmake/modules/rust.cmake: 5 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -168,8 +168,13 @@ ${config_paths}
    WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
  )

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

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