diff --git a/Cargo.lock b/Cargo.lock index 8188424..4fd55e7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -807,6 +807,15 @@ dependencies = [ "winapi", ] +[[package]] +name = "link-cplusplus" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8cae2cd7ba2f3f63938b9c724475dfb7b9861b545a90324476324ed21dbc8c8" +dependencies = [ + "cc", +] + [[package]] name = "log" version = "0.4.14" @@ -1074,6 +1083,7 @@ dependencies = [ "int-enum", "json", "lazy_static", + "link-cplusplus", "regex", "reqwest", "spin_on", diff --git a/Cargo.toml b/Cargo.toml index ae35aa6..8231dda 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,7 +29,10 @@ cmake = "0.1" bindgen = "0.59" [features] -exif = ["c_fixed_string", "int-enum", "utf16string"] +exif = ["c_fixed_string", "link-cplusplus", "int-enum", "utf16string"] [target.'cfg(windows)'.dependencies] winapi = { version = "0.3.9", features = ["winnls", "stringapiset"] } + +[target.'cfg(target_env = "gnu")'.dependencies] +link-cplusplus = { version = "1.0", features = ["libstdc++"], optional = true } diff --git a/src/main.rs b/src/main.rs index 088c8bc..615b9c1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -8,6 +8,8 @@ extern crate json; extern crate int_enum; #[macro_use] extern crate lazy_static; +#[cfg(all(feature = "link-cplusplus", target_env = "gnu"))] +extern crate link_cplusplus; extern crate tokio; extern crate regex; extern crate reqwest; diff --git a/utils b/utils index 3fe5fa5..d812fda 160000 --- a/utils +++ b/utils @@ -1 +1 @@ -Subproject commit 3fe5fa507b18c212099b3d2afeed1ad9842fa4c9 +Subproject commit d812fdaf0d852920a4be891d272444c0785b0333