feat(clipboard): add feature to avoid double linking gdiplus
This commit is contained in:
parent
c996bbb0f5
commit
ccb3e11d93
|
@ -10,6 +10,10 @@ build="build.rs"
|
||||||
# and wayland support will be enabled
|
# and wayland support will be enabled
|
||||||
wayland = ["wait-timeout"]
|
wayland = ["wait-timeout"]
|
||||||
|
|
||||||
|
# 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"
|
||||||
lazycell = "1.3.0"
|
lazycell = "1.3.0"
|
||||||
|
|
|
@ -30,6 +30,11 @@ fn cc_config() {
|
||||||
println!("cargo:rustc-link-lib=static=espansoclipboard");
|
println!("cargo:rustc-link-lib=static=espansoclipboard");
|
||||||
println!("cargo:rustc-link-lib=dylib=user32");
|
println!("cargo:rustc-link-lib=dylib=user32");
|
||||||
println!("cargo:rustc-link-lib=dylib=gdi32");
|
println!("cargo:rustc-link-lib=dylib=gdi32");
|
||||||
|
|
||||||
|
if cfg!(not(feature = "avoid-gdi")) {
|
||||||
|
println!("cargo:rustc-link-lib=dylib=gdiplus");
|
||||||
|
}
|
||||||
|
|
||||||
#[cfg(target_env = "gnu")]
|
#[cfg(target_env = "gnu")]
|
||||||
println!("cargo:rustc-link-lib=dylib=stdc++");
|
println!("cargo:rustc-link-lib=dylib=stdc++");
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,7 +38,6 @@
|
||||||
#include <winuser.h>
|
#include <winuser.h>
|
||||||
#include <strsafe.h>
|
#include <strsafe.h>
|
||||||
|
|
||||||
#pragma comment(lib, "gdiplus.lib")
|
|
||||||
#include <gdiplus.h>
|
#include <gdiplus.h>
|
||||||
|
|
||||||
#include <Windows.h>
|
#include <Windows.h>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user