From ba556553aea3e0241f337182b13429b736aa469b Mon Sep 17 00:00:00 2001 From: Earle Lowe Date: Wed, 30 Oct 2024 12:05:00 -0700 Subject: [PATCH 1/2] Try setting specific output directory for static libs --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index c9ae4c210..19c264a5d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,6 +2,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 3.14 FATAL_ERROR) set(CMAKE_CXX_STANDARD 17) set(CMAKE_POSITION_INDEPENDENT_CODE ON) + IF(NOT CMAKE_BUILD_TYPE) SET(CMAKE_BUILD_TYPE "RELEASE") ENDIF() @@ -125,6 +126,7 @@ FetchContent_Declare( GIT_REPOSITORY https://github.com/BLAKE3-team/BLAKE3.git GIT_TAG 1.5.0 ) +set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "$<1:${CMAKE_BINARY_DIR}/lib>") FetchContent_GetProperties(blake3) if(NOT blake3_POPULATED) From 1b939111432d4cc04824514b2af5b23f51643b65 Mon Sep 17 00:00:00 2001 From: Earle Lowe Date: Wed, 30 Oct 2024 13:34:52 -0700 Subject: [PATCH 2/2] fixup rust link library search path --- rust-bindings/build.rs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/rust-bindings/build.rs b/rust-bindings/build.rs index 2f746ffb7..2e0e664ef 100644 --- a/rust-bindings/build.rs +++ b/rust-bindings/build.rs @@ -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");