Commit afbbded2 authored by Steven Fackler's avatar Steven Fackler
Browse files

Merge pull request #158 from quentinbaradat/master

Fix the target for windows
parents ee66da60 e11bfa6f
Loading
Loading
Loading
Loading
+12 −13
Original line number Diff line number Diff line
@@ -15,12 +15,10 @@ fn main() {
                     (instructions in the README) and provide their location through \
                     $OPENSSL_PATH.");
        println!("cargo:rustc-flags=-L native={} -l crypto:static -l ssl:static", path);
        // going to assume the user built a new version of openssl
        build_old_openssl_shim(false);
        return;
    }

    if target.contains("win32") || target.contains("win64") {
    if target.contains("win32") || target.contains("win64") || target.contains("i386-pc-windows-gnu") || target.contains("x86_64-pc-windows-gnu") {
        println!("cargo:rustc-flags=-l crypto -l ssl -l gdi32 -l wsock32");
        // going to assume the user has a new version of openssl
        build_old_openssl_shim(false);
@@ -49,6 +47,7 @@ fn build_old_openssl_shim(is_old: bool) {
    gcc::compile_library("libold_openssl_shim.a",
            &config,
            &["src/old_openssl_shim.c"]);

    let out_dir = env::var_string("OUT_DIR").unwrap();
    println!("cargo:rustc-flags=-L native={} -l old_openssl_shim:static", out_dir);
}