Skip to content

Commit f96f083

Browse files
authored
Merge pull request #218 from Chia-Network/EL.output-generator
Use generator for output directory
2 parents 5b042d5 + 5e17829 commit f96f083

File tree

2 files changed

+12
-28
lines changed

2 files changed

+12
-28
lines changed

rust_bindings/build.rs

+9-25
Original file line numberDiff line numberDiff line change
@@ -28,23 +28,16 @@ fn main() {
2828

2929
println!("cargo:rustc-link-lib=static=chiavdfc");
3030

31-
if cfg!(target_os = "windows") {
32-
let build_type = if cfg!(debug_assertions) {
33-
"Debug"
34-
} else {
35-
"Release"
36-
};
37-
38-
println!(
39-
"cargo:rustc-link-search=native={}",
40-
dst.join("build")
41-
.join("lib")
42-
.join("static")
43-
.join(build_type)
44-
.to_str()
45-
.unwrap()
46-
);
31+
println!(
32+
"cargo:rustc-link-search=native={}",
33+
dst.join("build")
34+
.join("lib")
35+
.join("static")
36+
.to_str()
37+
.unwrap()
38+
);
4739

40+
if cfg!(target_os = "windows") {
4841
println!("cargo:rustc-link-lib=static=mpir");
4942
println!(
5043
"cargo:rustc-link-search=native={}",
@@ -56,15 +49,6 @@ fn main() {
5649
.unwrap()
5750
);
5851
} else {
59-
println!(
60-
"cargo:rustc-link-search=native={}",
61-
dst.join("build")
62-
.join("lib")
63-
.join("static")
64-
.to_str()
65-
.unwrap()
66-
);
67-
6852
println!("cargo:rustc-link-lib=gmp");
6953
}
7054

src/CMakeLists.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,12 @@ if(BUILD_CHIAVDFC)
101101

102102
set_target_properties(chiavdfc_shared PROPERTIES
103103
OUTPUT_NAME chiavdfc
104-
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib/shared"
105-
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib/shared"
104+
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib/shared$<0:>"
105+
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib/shared$<0:>"
106106
)
107107

108108
set_target_properties(chiavdfc_static PROPERTIES
109109
OUTPUT_NAME chiavdfc
110-
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib/static"
110+
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib/static$<0:>"
111111
)
112112
endif()

0 commit comments

Comments
 (0)