Hugal31 / yara-rust

Rust bindings for VirusTotal/Yara
Apache License 2.0
70 stars 30 forks source link

Explicitly set the openssl include directory #99

Closed rmccrystal closed 1 year ago

rmccrystal commented 1 year ago

I am trying to compile this crate on Windows with openssl using YARA_CRYPTO_LIB=openssl to fix the issue described by #89 and it complains that it cannot find an openssl header file. I fixed the issue on my end by adding a manual call to cc::Build::include inside build.rs to my openssl include directory, but it doesn't seem like there is any way to do this with environment variables

        let mut cc = cc::Build::new();
        cc.include(&basedir)
            .include(basedir.join("include"))
            .include(basedir.join("modules"))
            .include("C:\\Program Files\\OpenSSL-Win64\\include");
rmccrystal commented 1 year ago

98 fixes this

ikrivosheev commented 1 year ago

@rmccrystal can we close the issue?