diff options
| -rw-r--r-- | .github/workflows/ci.yml | 2 | ||||
| -rw-r--r-- | .gitmodules | 3 | ||||
| -rw-r--r-- | CMakeLists.txt | 1 | ||||
| -rw-r--r-- | include/cru/platform/gui/sdl/Window.h | 2 | ||||
| m--------- | lib/SDL | 0 | ||||
| -rw-r--r-- | src/platform/gui/sdl/CMakeLists.txt | 4 | ||||
| -rw-r--r-- | src/platform/gui/sdl/Window.cpp | 2 |
7 files changed, 8 insertions, 6 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 142b472f..62eb32c4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -89,7 +89,7 @@ jobs: run: | sudo apt update sudo apt install -y libpng-dev libcairo2-dev libpango1.0-dev libxcb1-dev libxcb-cursor-dev \ - libxkbcommon-dev libxcb-imdkit-dev libxkbcommon-x11-dev libsdl2-dev + libxkbcommon-dev libxcb-imdkit-dev libxkbcommon-x11-dev - name: Build run: | diff --git a/.gitmodules b/.gitmodules index d49fb062..3acf86e8 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "lib/Catch2"] path = lib/Catch2 url = https://github.com/catchorg/Catch2.git +[submodule "lib/SDL"] + path = lib/SDL + url = https://github.com/libsdl-org/SDL.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 980ff1ff..a5315b73 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,6 +16,7 @@ if (APPLE) endif() add_subdirectory(lib/Catch2) +add_subdirectory(lib/SDL) enable_testing() diff --git a/include/cru/platform/gui/sdl/Window.h b/include/cru/platform/gui/sdl/Window.h index 4eb0a11d..c818ecce 100644 --- a/include/cru/platform/gui/sdl/Window.h +++ b/include/cru/platform/gui/sdl/Window.h @@ -4,7 +4,7 @@ #include "../Window.h" #include "Base.h" -#include <SDL_video.h> +#include <SDL3/SDL_video.h> #include <cstddef> #include <optional> diff --git a/lib/SDL b/lib/SDL new file mode 160000 +Subproject cecf4b0d4e771fea01ecbd0594a948ee0f872fb diff --git a/src/platform/gui/sdl/CMakeLists.txt b/src/platform/gui/sdl/CMakeLists.txt index f4266622..7d95f681 100644 --- a/src/platform/gui/sdl/CMakeLists.txt +++ b/src/platform/gui/sdl/CMakeLists.txt @@ -1,10 +1,8 @@ -find_package(SDL2 REQUIRED CONFIG REQUIRED COMPONENTS SDL2) - add_library(CruPlatformGuiSdl UiApplication.cpp Window.cpp ) target_link_libraries(CruPlatformGuiSdl PUBLIC CruPlatformGui CruPlatformGraphicsCairo - SDL2::SDL2 + SDL3::SDL3 ) diff --git a/src/platform/gui/sdl/Window.cpp b/src/platform/gui/sdl/Window.cpp index 84cf0ad4..3737cae0 100644 --- a/src/platform/gui/sdl/Window.cpp +++ b/src/platform/gui/sdl/Window.cpp @@ -8,7 +8,7 @@ #include "cru/platform/gui/Window.h" #include "cru/platform/gui/sdl/UiApplication.h" -#include <SDL_video.h> +#include <SDL3/SDL_video.h> #include <cairo-xcb.h> #include <cairo.h> #include <cassert> |
