Skip to content

Commit 06eeed8

Browse files
committed
Add build.rs
1 parent 09cc301 commit 06eeed8

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

system-configuration-sys/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@ keywords = ["macos", "system", "configuration", "bindings"]
77
categories = ["api-bindings", "external-ffi-bindings"]
88
repository = "https://github.com/mullvad/system-configuration-rs"
99
license = "MIT/Apache-2.0"
10+
build = "build.rs"
1011

1112
[dependencies]

system-configuration-sys/build.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Copyright 2017 Amagicom AB.
2+
//
3+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
4+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
5+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
6+
// option. This file may not be copied, modified, or distributed
7+
// except according to those terms.
8+
9+
10+
fn main() {
11+
if std::env::var("TARGET").unwrap().contains("-apple") {
12+
println!("cargo:rustc-link-lib=framework=SystemConfiguration");
13+
}
14+
}

0 commit comments

Comments
 (0)