Skip to content

Commit

Permalink
Add a rustflag that will cause it to print out what I need to link with
Browse files Browse the repository at this point in the history
  • Loading branch information
Pwootage committed Oct 14, 2023
1 parent 0dae2b0 commit c60c1ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ add_custom_command(
OUTPUT ${BSTRUCT_LIB}-dummy
OUTPUT ${BSTRUCT_LIB}
OUTPUT ${BSTRUCT_HEADER}
COMMAND ${CMAKE_COMMAND} -E env CARGO_TARGET_DIR=${CMAKE_CURRENT_BINARY_DIR}/cargo ${CARGO_CMD}
COMMAND ${CMAKE_COMMAND} -E env CARGO_TARGET_DIR=${CMAKE_CURRENT_BINARY_DIR}/cargo RUSTFLAGS=--print=native-static-libs ${CARGO_CMD}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/extern/bstruct_rust)

add_custom_target(print_lib_dir
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/extern/bstruct_rust
COMMAND ${CMAKE_COMMAND} -E env CARGO_TARGET_DIR=${CMAKE_CURRENT_BINARY_DIR}/cargo ${CARGO_CMD}
COMMAND ${CMAKE_COMMAND} -E env CARGO_TARGET_DIR=${CMAKE_CURRENT_BINARY_DIR}/cargo RUSTFLAGS=--print=native-static-libs ${CARGO_CMD}
COMMAND ${LS_CMD} ${CMAKE_CURRENT_BINARY_DIR}/cargo/${CARGO_TARGET_DIR}
)

Expand Down

0 comments on commit c60c1ce

Please sign in to comment.