diff --git a/sdl2-sys/build.rs b/sdl2-sys/build.rs index e77efafa0f..6cd2ef2a75 100644 --- a/sdl2-sys/build.rs +++ b/sdl2-sys/build.rs @@ -245,29 +245,29 @@ fn link_sdl2(target_os: &str) { if cfg!(feature = "bundled") || (cfg!(feature = "use-pkgconfig") == false && cfg!(feature = "use-vcpkg") == false) { - println!("cargo:rustc-link-lib=SDL2main"); + println!("cargo:rustc-link-lib=static=SDL2main"); if target_os == "windows-msvc" { - println!("cargo:rustc-link-lib=SDL2-static"); + println!("cargo:rustc-link-lib=static=SDL2-static"); } else { - println!("cargo:rustc-link-lib=SDL2"); + println!("cargo:rustc-link-lib=static=SDL2"); } - // bundled not support the other feature + // Additional SDL libraries are not supported when using "bundled" if !cfg!(feature = "bundled") { if cfg!(feature = "gfx") { - println!("cargo:rustc-link-lib=SDL2_gfx"); + println!("cargo:rustc-link-lib=static=SDL2_gfx"); } if cfg!(feature = "mixer") { - println!("cargo:rustc-link-lib=SDL2_mixer"); + println!("cargo:rustc-link-lib=static=SDL2_mixer"); } if cfg!(feature = "image") { - println!("cargo:rustc-link-lib=SDL2_image"); + println!("cargo:rustc-link-lib=static=SDL2_image"); } if cfg!(feature = "ttf") { - println!("cargo:rustc-link-lib=SDL2_ttf"); + println!("cargo:rustc-link-lib=static=SDL2_ttf"); } } }