Disable platform-specific default functions

This commit is contained in:
Joonas Javanainen 2019-06-27 23:25:44 +03:00
parent 607a0c7df4
commit 21cc1af4ce
No known key found for this signature in database
GPG Key ID: D39CCA5CB19B9179
2 changed files with 4 additions and 6 deletions

View File

@ -15,9 +15,3 @@ travis-ci = { repository = "Gekkio/imgui-rs" }
[build-dependencies]
cc = "1.0"
[target.'cfg(target_os = "macos")'.dependencies]
core-foundation = "0.6"
[target.'cfg(windows)'.dependencies]
winapi = { version = "0.3", features = ["imm"] }

View File

@ -25,6 +25,10 @@ fn assert_file_exists(path: &str) -> io::Result<()> {
fn main() -> io::Result<()> {
let mut build = cc::Build::new();
build.cpp(true);
// Disabled due to linking issues
build
.define("IMGUI_DISABLE_WIN32_FUNCTIONS", None)
.define("IMGUI_DISABLE_OSX_FUNCTIONS", None);
for path in &CPP_FILES {
assert_file_exists(path)?;
build.file(path);