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"
|
edition = "2018"
|
||||||
build="build.rs"
|
build="build.rs"
|
||||||
|
|
||||||
|
[features]
|
||||||
|
# If enabled, avoid linking with the gdiplus library on Windows, which
|
||||||
|
# might conflict with wxWidgets
|
||||||
|
avoid-gdi = []
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
log = "0.4.14"
|
log = "0.4.14"
|
||||||
serde_json = "1.0.61"
|
serde_json = "1.0.61"
|
||||||
|
|
|
@ -34,8 +34,10 @@ fn cc_config() {
|
||||||
println!("cargo:rustc-link-lib=dylib=user32");
|
println!("cargo:rustc-link-lib=dylib=user32");
|
||||||
#[cfg(target_env = "gnu")]
|
#[cfg(target_env = "gnu")]
|
||||||
println!("cargo:rustc-link-lib=dylib=stdc++");
|
println!("cargo:rustc-link-lib=dylib=stdc++");
|
||||||
#[cfg(target_env = "gnu")]
|
|
||||||
println!("cargo:rustc-link-lib=dylib=gdiplus");
|
if cfg!(not(feature = "avoid-gdi")) {
|
||||||
|
println!("cargo:rustc-link-lib=dylib=gdiplus");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(target_os = "linux")]
|
#[cfg(target_os = "linux")]
|
||||||
|
|
|
@ -41,7 +41,6 @@
|
||||||
#pragma comment(lib, "Shell32.lib")
|
#pragma comment(lib, "Shell32.lib")
|
||||||
#include <shellapi.h>
|
#include <shellapi.h>
|
||||||
|
|
||||||
#pragma comment(lib, "Gdi32.lib")
|
|
||||||
#include <Windows.h>
|
#include <Windows.h>
|
||||||
|
|
||||||
#include "WinToast/wintoastlib.h"
|
#include "WinToast/wintoastlib.h"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user