diff --git a/mongo_c_driver_wrapper/Cargo.toml b/mongo_c_driver_wrapper/Cargo.toml index fd228d0..c3e3484 100644 --- a/mongo_c_driver_wrapper/Cargo.toml +++ b/mongo_c_driver_wrapper/Cargo.toml @@ -7,8 +7,5 @@ authors = ["Thijs Cadier "] [dependencies] libc = "*" -[build-dependencies] -pkg-config = "*" - [build-dependencies.bindgen] git = "https://github.com/crabtw/rust-bindgen.git" diff --git a/mongo_c_driver_wrapper/build.rs b/mongo_c_driver_wrapper/build.rs index 731004f..fcae5f3 100644 --- a/mongo_c_driver_wrapper/build.rs +++ b/mongo_c_driver_wrapper/build.rs @@ -1,7 +1,6 @@ #![feature(path_ext)] extern crate bindgen; -extern crate pkg_config; use std::env; use std::fs::PathExt; @@ -115,7 +114,8 @@ fn main() { println!("cargo:rustc-link-lib=static=bson-1.0"); println!("cargo:rustc-link-lib=static=mongoc-1.0"); - for link_path in pkg_config::find_library("openssl").unwrap().link_paths.iter(){ - println!("cargo:rustc-link-search=framework={}", &link_path.display()); - } + // Link openssl dynamically + // TODO see if we can make this compatible with openssl-sys + println!("cargo:rustc-link-lib=dylib=ssl"); + println!("cargo:rustc-link-lib=dylib=crypto"); }