summaryrefslogtreecommitdiff
path: root/rust/CMakeLists.txt
diff options
context:
space:
mode:
authorMark Rowe <mark@vector35.com>2025-08-06 11:21:39 -0700
committerMark Rowe <mark@vector35.com>2025-08-07 20:24:02 -0700
commit72e0b2f89352bf45af44629c97741977090dcd78 (patch)
tree4d98aed8ed0bf3d40da983058dac360ebc8f750b /rust/CMakeLists.txt
parent1d25b8cb9304f53f80d1df960341d7c21d40ab13 (diff)
Fix clean builds when CMake is using Unix Makefiles
The `$<TARGET_FILE:binaryninjaapi>` syntax does not do what is intended for Unix Makefiles. In practice there's no reason for this custom command to depend on the `binaryninjaapi` target. The Rust API uses core's C APIs directly rather than via the C++ API, and it already depends on binaryninjacore.h via `RUST_API_SOURCES`. Since it's running `cargo check` and not doing a full compilation this header-only dependency is sufficient.
Diffstat (limited to 'rust/CMakeLists.txt')
-rw-r--r--rust/CMakeLists.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/rust/CMakeLists.txt b/rust/CMakeLists.txt
index 03ab89bc..caead2d9 100644
--- a/rust/CMakeLists.txt
+++ b/rust/CMakeLists.txt
@@ -49,7 +49,7 @@ add_custom_command(
COMMAND ${CMAKE_COMMAND} -E env BINARYNINJADIR=${BN_INSTALL_BIN_DIR} ${RUSTUP_CHECK_COMMAND} ${CARGO_CHECK_OPTS}
COMMAND ${CMAKE_COMMAND} -E touch ${PROJECT_BINARY_DIR}/rust_api.stamp
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
- DEPENDS ${RUST_API_SOURCES} $<TARGET_FILE:binaryninjaapi>
+ DEPENDS ${RUST_API_SOURCES}
COMMENT "Checking Rust API"
VERBATIM
)