Skip to content

Commit

Permalink
don't repeat yourself
Browse files Browse the repository at this point in the history
  • Loading branch information
tesuji committed Sep 8, 2024
1 parent 04d000e commit 183fcf0
Showing 1 changed file with 5 additions and 17 deletions.
22 changes: 5 additions & 17 deletions sdl2-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -659,26 +659,14 @@ fn generate_bindings(target: &str, host: &str, headers_paths: &[String]) {
.raw_line("use crate::*;")
.ctypes_prefix("libc");

let mut ttf_bindings = bindgen::Builder::default()
.use_core()
.raw_line("use crate::*;")
.ctypes_prefix("libc");
let mut ttf_bindings = image_bindings.clone();

let mut mixer_bindings = bindgen::Builder::default()
.use_core()
.raw_line("use crate::*;")
.ctypes_prefix("libc");
let mut mixer_bindings = image_bindings.clone();

let mut gfx_framerate_bindings = bindgen::Builder::default().use_core().ctypes_prefix("libc");
let mut gfx_primitives_bindings = bindgen::Builder::default()
.use_core()
.raw_line("use crate::*;")
.ctypes_prefix("libc");
let mut gfx_imagefilter_bindings = bindgen::Builder::default().use_core().ctypes_prefix("libc");
let mut gfx_rotozoom_bindings = bindgen::Builder::default()
.use_core()
.raw_line("use crate::*;")
.ctypes_prefix("libc");
let mut gfx_primitives_bindings = image_bindings.clone();
let mut gfx_imagefilter_bindings = gfx_framerate_bindings.clone();
let mut gfx_rotozoom_bindings = gfx_primitives_bindings.clone();

// Set correct target triple for bindgen when cross-compiling
if target != host {
Expand Down

0 comments on commit 183fcf0

Please sign in to comment.