Skip to content

Commit

Permalink
gnullvm workaround for implib in deps dir
Browse files Browse the repository at this point in the history
  • Loading branch information
jschwe committed Sep 4, 2024
1 parent a0172cf commit 55a560d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions cmake/Corrosion.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,12 @@ function(_corrosion_copy_byproduct_deferred target_name output_dir_prop_names ca
string(APPEND file_names "${suffix}")
endif()
endif()

list(TRANSFORM file_names PREPEND "${cargo_build_dir}/" OUTPUT_VARIABLE src_file_names)
set(src_file_names "${file_names}")
if(Rust_CARGO_TARGET_ENV STREQUAL "gnullvm")
# Workaround for cargo not exposing implibs yet.
list(TRANSFORM src_file_names PREPEND "deps/" REGEX "\.dll\.a$")
endif()
list(TRANSFORM src_file_names PREPEND "${cargo_build_dir}/")
list(TRANSFORM file_names PREPEND "${output_dir}/" OUTPUT_VARIABLE dst_file_names)
message(DEBUG "Adding command to copy byproducts `${file_names}` to ${dst_file_names}")
add_custom_command(TARGET _cargo-build_${target_name}
Expand Down

0 comments on commit 55a560d

Please sign in to comment.