From c60c1ceb4e2d28be3da77d24257fbdfd36356bb2 Mon Sep 17 00:00:00 2001 From: Pwootage Date: Fri, 13 Oct 2023 19:46:50 -0600 Subject: [PATCH] Add a rustflag that will cause it to print out what I need to link with --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 41c993b..ebda108 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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} )