File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11use std:: env;
2+ use std:: fs;
23use std:: path:: PathBuf ;
34
45use cmake:: Config ;
@@ -27,8 +28,14 @@ fn main() {
2728 . define ( "BUILD_CHIAVDFC" , "ON" )
2829 . env ( "BUILD_VDF_CLIENT" , "N" )
2930 . define ( "BUILD_PYTHON" , "OFF" )
30- . define ( "HARDENING" , if is_fuzzing || is_debug_build { "ON" } else { "OFF" } )
31- . very_verbose ( true )
31+ . define (
32+ "HARDENING" ,
33+ if is_fuzzing || is_debug_build {
34+ "ON"
35+ } else {
36+ "OFF"
37+ } ,
38+ )
3239 . build ( ) ;
3340
3441 println ! ( "cargo:rustc-link-lib=static=chiavdfc" ) ;
@@ -55,7 +62,12 @@ fn main() {
5562 ) ;
5663 } else if cfg ! ( target_os = "macos" ) {
5764 println ! ( "cargo:rustc-link-lib=static=gmp" ) ;
58- println ! ( "cargo:rustc-link-search=native=/opt/homebrew/lib" ) ;
65+ let homebrew_path = if fs:: metadata ( "/opt/homebrew" ) . is_ok ( ) {
66+ "/opt/homebrew/lib"
67+ } else {
68+ "/usr/local/lib"
69+ } ;
70+ println ! ( "cargo:rustc-link-search=native={homebrew_path}" ) ;
5971 } else {
6072 println ! ( "cargo:rustc-link-lib=gmp" ) ;
6173 }
You can’t perform that action at this time.
0 commit comments