@@ -244,29 +244,29 @@ fn link_sdl2(target_os: &str) {
244
244
if cfg ! ( feature = "bundled" )
245
245
|| ( cfg ! ( feature = "use-pkgconfig" ) == false && cfg ! ( feature = "use-vcpkg" ) == false )
246
246
{
247
- println ! ( "cargo:rustc-link-lib=SDL2main" ) ;
247
+ println ! ( "cargo:rustc-link-lib=static= SDL2main" ) ;
248
248
if target_os == "windows-msvc" {
249
- println ! ( "cargo:rustc-link-lib=SDL2-static" ) ;
249
+ println ! ( "cargo:rustc-link-lib=static= SDL2-static" ) ;
250
250
} else {
251
- println ! ( "cargo:rustc-link-lib=SDL2" ) ;
251
+ println ! ( "cargo:rustc-link-lib=static= SDL2" ) ;
252
252
}
253
253
254
- // bundled not support the other feature
254
+ // Additional SDL libraries are not supported when using "bundled"
255
255
if !cfg ! ( feature = "bundled" ) {
256
256
if cfg ! ( feature = "gfx" ) {
257
- println ! ( "cargo:rustc-link-lib=SDL2_gfx" ) ;
257
+ println ! ( "cargo:rustc-link-lib=static= SDL2_gfx" ) ;
258
258
}
259
259
260
260
if cfg ! ( feature = "mixer" ) {
261
- println ! ( "cargo:rustc-link-lib=SDL2_mixer" ) ;
261
+ println ! ( "cargo:rustc-link-lib=static= SDL2_mixer" ) ;
262
262
}
263
263
264
264
if cfg ! ( feature = "image" ) {
265
- println ! ( "cargo:rustc-link-lib=SDL2_image" ) ;
265
+ println ! ( "cargo:rustc-link-lib=static= SDL2_image" ) ;
266
266
}
267
267
268
268
if cfg ! ( feature = "ttf" ) {
269
- println ! ( "cargo:rustc-link-lib=SDL2_ttf" ) ;
269
+ println ! ( "cargo:rustc-link-lib=static= SDL2_ttf" ) ;
270
270
}
271
271
}
272
272
}
0 commit comments