Skip to content

Commit 9baee48

Browse files
committed
Fix macos build of example
1 parent d6fd048 commit 9baee48

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

examples/graph/build.rs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,17 @@ extern crate cpp_build;
1919

2020
fn main() {
2121
let qt_include_path = std::env::var("DEP_QT_INCLUDE_PATH").unwrap();
22-
cpp_build::Config::new()
22+
let qt_library_path = std::env::var("DEP_QT_LIBRARY_PATH").unwrap();
23+
24+
#[allow(unused_mut)]
25+
let mut config = cpp_build::Config::new();
26+
27+
if cfg!(target_os = "macos") {
28+
config.flag("-F");
29+
config.flag(&qt_library_path);
30+
}
31+
32+
config
2333
.include(&qt_include_path)
2434
.include(format!("{}/QtQuick", qt_include_path))
2535
.include(format!("{}/QtCore", qt_include_path))

0 commit comments

Comments
 (0)