Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Experiment with manually setting archive output directory for blake3 and chiapos_static #458

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading