Skip to content

Commit

Permalink
Experiment with manually setting archive output directory for blake3 …
Browse files Browse the repository at this point in the history
…and chiapos_static (#458)
  • Loading branch information
emlowe authored Oct 31, 2024
2 parents 329d2de + 468979a commit ef75bc7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ endif()

set(BLAKE3_SRC ${blake3_SOURCE_DIR}/c)
set(BLAKE3_INCLUDE_DIR ${blake3_SOURCE_DIR}/c)
set_target_properties(blake3 PROPERTIES ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib$<0:>")
target_link_libraries(chiapos PRIVATE blake3)
target_link_libraries(ProofOfSpace PRIVATE blake3)
include_directories(
Expand All @@ -157,6 +158,7 @@ IF (BUILD_STATIC_CHIAPOS_LIBRARY)
add_library(chiapos_static STATIC src/chacha8.c c-bindings/wrapper.cpp)
target_link_libraries(chiapos_static PUBLIC blake3)
target_include_directories(chiapos_static PUBLIC lib/include)
set_target_properties(chiapos_static PROPERTIES ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib$<0:>")
ENDIF()

FetchContent_Declare(
Expand Down
10 changes: 1 addition & 9 deletions rust-bindings/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,7 @@ fn main() {

println!(
"cargo:rustc-link-search=native={}",
dst.join("build").to_str().unwrap()
);
println!(
"cargo:rustc-link-search=native={}",
dst.join("build")
.join("_deps")
.join("blake3-build")
.to_str()
.unwrap()
dst.join("build").join("lib").to_str().unwrap()
);

println!("cargo:rustc-link-lib=static=chiapos_static");
Expand Down

0 comments on commit ef75bc7

Please sign in to comment.