Skip to content

Commit df8f369

Browse files
committed
Fix some misc Rust CMakeLists.txt issues
GLOB_RECURSE has been cut down a little bit to make configuring times reasonable
1 parent 0318574 commit df8f369

File tree

4 files changed

+13
-14
lines changed

4 files changed

+13
-14
lines changed

plugins/idb_import/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ file(GLOB_RECURSE PLUGIN_SOURCES CONFIGURE_DEPENDS
66
${PROJECT_SOURCE_DIR}/Cargo.toml
77
${PROJECT_SOURCE_DIR}/src/*.rs)
88

9-
file(GLOB_RECURSE API_SOURCES CONFIGURE_DEPENDS
9+
file(GLOB API_SOURCES CONFIGURE_DEPENDS
1010
${PROJECT_SOURCE_DIR}/../../binaryninjacore.h
1111
${PROJECT_SOURCE_DIR}/../../rust/binaryninjacore-sys/build.rs
1212
${PROJECT_SOURCE_DIR}/../../rust/binaryninjacore-sys/Cargo.toml
1313
${PROJECT_SOURCE_DIR}/../../rust/binaryninjacore-sys/src/*
1414
${PROJECT_SOURCE_DIR}/../../rust/Cargo.toml
15-
${PROJECT_SOURCE_DIR}/../../rust/src/*.rs)
15+
${PROJECT_SOURCE_DIR}/../../rust/src/*/*.rs)
1616

1717
if(CMAKE_BUILD_TYPE MATCHES Debug)
1818
set(TARGET_DIR ${PROJECT_BINARY_DIR}/target/debug)

plugins/pdb-ng/CMakeLists.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,6 @@ file(GLOB PLUGIN_SOURCES CONFIGURE_DEPENDS
66
${PROJECT_SOURCE_DIR}/Cargo.toml
77
${PROJECT_SOURCE_DIR}/src/*.rs)
88

9-
file(GLOB_RECURSE API_SOURCES CONFIGURE_DEPENDS
10-
${PROJECT_SOURCE_DIR}/../../binaryninjacore.h
11-
${PROJECT_SOURCE_DIR}/../../rust/binaryninjacore-sys/build.rs
12-
${PROJECT_SOURCE_DIR}/../../rust/binaryninjacore-sys/Cargo.toml
13-
${PROJECT_SOURCE_DIR}/../../rust/binaryninjacore-sys/src/*
14-
${PROJECT_SOURCE_DIR}/../../rust/Cargo.toml
15-
${PROJECT_SOURCE_DIR}/../../rust/src/*.rs)
16-
179
if(CMAKE_BUILD_TYPE MATCHES Debug)
1810
if(DEMO)
1911
set(TARGET_DIR ${PROJECT_BINARY_DIR}/target/dev-demo)
@@ -62,6 +54,14 @@ get_target_property(BN_API_SOURCE_DIR binaryninjaapi SOURCE_DIR)
6254
list(APPEND CMAKE_MODULE_PATH "${BN_API_SOURCE_DIR}/cmake")
6355
find_package(BinaryNinjaCore REQUIRED)
6456

57+
file(GLOB API_SOURCES CONFIGURE_DEPENDS
58+
${BN_API_SOURCE_DIR}/binaryninjacore.h
59+
${BN_API_SOURCE_DIR}/rust/binaryninjacore-sys/build.rs
60+
${BN_API_SOURCE_DIR}/rust/binaryninjacore-sys/Cargo.toml
61+
${BN_API_SOURCE_DIR}/rust/binaryninjacore-sys/src/*
62+
${BN_API_SOURCE_DIR}/rust/Cargo.toml
63+
${BN_API_SOURCE_DIR}/rust/src/*/*.rs)
64+
6565
set_property(TARGET ${PROJECT_NAME} PROPERTY OUTPUT_FILE_PATH ${OUTPUT_FILE_PATH})
6666

6767
find_program(RUSTUP_PATH rustup REQUIRED HINTS ~/.cargo/bin)

plugins/warp/CMakeLists.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,9 @@ set(BINJA_LIB_DIR ${BN_INSTALL_BIN_DIR})
5252
set_property(TARGET ${PROJECT_NAME} PROPERTY OUTPUT_FILE_PATH ${OUTPUT_FILE_PATH})
5353

5454
# Add the whole api to the depends too
55-
file(GLOB_RECURSE API_SOURCES CONFIGURE_DEPENDS
55+
file(GLOB API_SOURCES CONFIGURE_DEPENDS
5656
${BN_API_SOURCE_DIR}/binaryninjacore.h
57-
${BN_API_SOURCE_DIR}/rust/src/*.rs
58-
${BN_API_SOURCE_DIR}/rust/binaryninjacore-sys/src/*.rs)
57+
${BN_API_SOURCE_DIR}/rust/src/*/*.rs)
5958

6059
find_program(RUSTUP_PATH rustup REQUIRED HINTS ~/.cargo/bin)
6160
set(RUSTUP_COMMAND ${RUSTUP_PATH} run ${CARGO_STABLE_VERSION} cargo)

rust/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ file(GLOB RUST_API_SOURCES CONFIGURE_DEPENDS
1010
binaryninjacore-sys/Cargo.toml
1111
binaryninjacore-sys/src/*
1212
Cargo.toml
13-
src/*.rs)
13+
src/*/*.rs)
1414

1515
if(CMAKE_BUILD_TYPE MATCHES Debug)
1616
set(CARGO_CHECK_OPTS --workspace)

0 commit comments

Comments
 (0)