Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions qttypes/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ qtsql = []
# Link against QtTest
qttest = []

staticruntime = []

default = ["required"]

[dependencies]
Expand Down
8 changes: 8 additions & 0 deletions qttypes/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,5 +272,13 @@ fn main() {
link_lib("Sql");
#[cfg(feature = "qttest")]
link_lib("Test");

#[cfg(feature = "staticruntime")]
if cargo_target_env == "msvc" {
let qt_plugins_path = qmake_query("QT_INSTALL_PLUGINS");
println!("cargo:rustc-link-search={}", &qt_plugins_path);
println!("cargo:rustc-link-lib=static=platforms/qwindows");
}

println!("cargo:rerun-if-changed=src");
}
7 changes: 7 additions & 0 deletions qttypes/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,13 @@ cpp! {{
#include <QtGui/QBrush>
}}

#[cfg(feature = "staticruntime")]
cpp! {{
#include <QtCore/QtPlugin>

Q_IMPORT_PLUGIN (QWindowsIntegrationPlugin)
}}

cpp_class!(
/// Wrapper around [`QDate`][class] class.
///
Expand Down