diff options
| author | Andrew Guschin <guschin@altlinux.org> | 2026-08-03 17:52:58 +0400 |
|---|---|---|
| committer | Andrew Guschin <guschin@altlinux.org> | 2026-08-03 17:52:58 +0400 |
| commit | 1da6636ef354b77857a57059e47c3801304361cf (patch) | |
| tree | a8f07c59cd01ff275283d35dacc452c3730fe4a7 /crates/flasher-qt/build.rs | |
| parent | 04c1d3d8751ae55b0dc963fa32359875f58a3fe1 (diff) | |
remake ui with kirigamimain
Diffstat (limited to 'crates/flasher-qt/build.rs')
| -rw-r--r-- | crates/flasher-qt/build.rs | 27 |
1 files changed, 4 insertions, 23 deletions
diff --git a/crates/flasher-qt/build.rs b/crates/flasher-qt/build.rs index e4bdfc2..d57bff5 100644 --- a/crates/flasher-qt/build.rs +++ b/crates/flasher-qt/build.rs @@ -1,25 +1,6 @@ fn main() { - println!("cargo:rerun-if-changed=src/ui.cpp"); - - let qt = pkg_config::Config::new() - .atleast_version("5.12") - .cargo_metadata(false) - .probe("Qt5Widgets") - .expect("Qt 5 Widgets development files were not found (install qt5-base-devel)"); - - let mut build = cc::Build::new(); - build.cpp(true).file("src/ui.cpp").flag_if_supported("-std=c++17"); - for path in &qt.include_paths { - build.include(path); - } - build.compile("flasher_qt_ui"); - - // Keep shared Qt libraries after our static C++ archive on the linker - // command line; GNU ld resolves static archives from left to right. - for path in &qt.link_paths { - println!("cargo:rustc-link-search=native={}", path.display()); - } - println!("cargo:rustc-link-lib=Qt5Widgets"); - println!("cargo:rustc-link-lib=Qt5Gui"); - println!("cargo:rustc-link-lib=Qt5Core"); + cxx_qt_build::CxxQtBuilder::new() + .qt_module("Qml") + .qt_module("Quick") + .build(); } |