Skip to content

Commit 91df75d

Browse files
committed
Make libcc2rs depend on libcc2rs-macros
1 parent ad0e083 commit 91df75d

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

libcc2rs/CMakeLists.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
set(RUST_LIB_DIR ${CMAKE_SOURCE_DIR}/libcc2rs)
2+
set(RUST_MACROS_DIR ${CMAKE_SOURCE_DIR}/libcc2rs-macros)
23
set(RUST_BUILD_DIR ${CMAKE_BINARY_DIR}/rust)
34
file(GLOB_RECURSE LIBCC2RS_SOURCE "${RUST_LIB_DIR}/*.rs")
5+
file(GLOB_RECURSE LIBCC2RS_MACROS_SOURCE "${RUST_MACROS_DIR}/*.rs")
46

57
add_custom_command(
68
OUTPUT ${RUST_BUILD_DIR}/release/liblibcc2rs.rlib
79
COMMAND ${CMAKE_COMMAND} -E env CARGO_TARGET_DIR=${RUST_BUILD_DIR} cargo build --release
810
WORKING_DIRECTORY ${RUST_LIB_DIR}
9-
DEPENDS ${LIBCC2RS_SOURCE} ${RUST_LIB_DIR}/Cargo.toml
11+
DEPENDS
12+
${LIBCC2RS_SOURCE}
13+
${LIBCC2RS_MACROS_SOURCE}
14+
${RUST_LIB_DIR}/Cargo.toml
15+
${RUST_MACROS_DIR}/Cargo.toml
1016
COMMENT "Building libcc2rs"
1117
)
1218

0 commit comments

Comments
 (0)