From b50e017e7ab6664e974feed09bb03c12bd52e756 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Magalh=C3=A3es?= <joamag@gmail.com> Date: Sun, 26 Feb 2023 22:25:53 +0000 Subject: [PATCH] feat: conditional features for SDL2 for Linux This makes it possible to run Boytacean in Ubuntu using dynamic linking with the native SDL libraries. --- frontends/sdl/Cargo.toml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frontends/sdl/Cargo.toml b/frontends/sdl/Cargo.toml index d762d080..1606cfdb 100644 --- a/frontends/sdl/Cargo.toml +++ b/frontends/sdl/Cargo.toml @@ -11,8 +11,10 @@ edition = "2018" path = "../.." [dependencies.sdl2] -version = "0.35" -features = ["ttf", "image", "gfx", "mixer", "static-link", "use-vcpkg"] +sdl2 = { version = "0.35", features = ["ttf", "image", "gfx", "mixer", "static-link", "use-vcpkg"] } + +[target.'cfg(linux)'.dependencies] +sdl2 = { version = "0.35", features = ["ttf", "image", "gfx", "mixer", "bundled"] } [package.metadata.vcpkg] dependencies = ["sdl2", "sdl2-image[libjpeg-turbo,tiff,libwebp]", "sdl2-ttf", "sdl2-gfx", "sdl2-mixer"] -- GitLab