feat(ui): add feature to avoid double linking gdiplus
This commit is contained in:
parent
ccb3e11d93
commit
04720212e5
|
@ -5,6 +5,11 @@ authors = ["Federico Terzi <federico-terzi@users.noreply.github.com>"]
|
|||
edition = "2018"
|
||||
build="build.rs"
|
||||
|
||||
[features]
|
||||
# If enabled, avoid linking with the gdiplus library on Windows, which
|
||||
# might conflict with wxWidgets
|
||||
avoid-gdi = []
|
||||
|
||||
[dependencies]
|
||||
log = "0.4.14"
|
||||
serde_json = "1.0.61"
|
||||
|
|
|
@ -34,9 +34,11 @@ fn cc_config() {
|
|||
println!("cargo:rustc-link-lib=dylib=user32");
|
||||
#[cfg(target_env = "gnu")]
|
||||
println!("cargo:rustc-link-lib=dylib=stdc++");
|
||||
#[cfg(target_env = "gnu")]
|
||||
|
||||
if cfg!(not(feature = "avoid-gdi")) {
|
||||
println!("cargo:rustc-link-lib=dylib=gdiplus");
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
fn cc_config() {
|
||||
|
|
|
@ -41,7 +41,6 @@
|
|||
#pragma comment(lib, "Shell32.lib")
|
||||
#include <shellapi.h>
|
||||
|
||||
#pragma comment(lib, "Gdi32.lib")
|
||||
#include <Windows.h>
|
||||
|
||||
#include "WinToast/wintoastlib.h"
|
||||
|
|
Loading…
Reference in New Issue
Block a user