Skip to content

Commit c555aa9

Browse files
committed
Always build SDL2 in release mode
1 parent 89a7ee2 commit c555aa9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

sdl2-sys/build.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ fn download_sdl2() -> PathBuf {
115115
#[cfg(feature = "bundled")]
116116
fn compile_sdl2(sdl2_build_path: &Path, target_os: &str) -> PathBuf {
117117
let mut cfg = cmake::Config::new(sdl2_build_path);
118+
cfg.define("CMAKE_BUILD_TYPE", "RELEASE");
118119

119120
if target_os == "windows-gnu" {
120121
cfg.define("VIDEO_OPENGLES", "OFF");
@@ -185,8 +186,8 @@ fn link_sdl2(target_os: &str) {
185186

186187
#[cfg(feature = "static-link")] {
187188
if cfg!(feature = "bundled") || cfg!(feature = "use-pkgconfig") == false {
188-
println!("cargo:rustc-link-lib=static=SDL2maind");
189-
println!("cargo:rustc-link-lib=static=SDL2d");
189+
println!("cargo:rustc-link-lib=static=SDL2main");
190+
println!("cargo:rustc-link-lib=static=SDL2");
190191
}
191192

192193
// Also linked to any required libraries for each supported platform

0 commit comments

Comments
 (0)