aboutsummaryrefslogtreecommitdiff
path: root/src/keyboard
diff options
context:
space:
mode:
authorXavier Del Campo Romero <xavi.dcr@tutanota.com>2022-07-23 04:18:22 +0200
committerXavier Del Campo Romero <xavi.dcr@tutanota.com>2022-07-23 04:23:05 +0200
commite8dd951c6c2bc3f3496eec26192b9b81c062ca1a (patch)
treec209fdc85fb39499cd58925aace8e179b8998213 /src/keyboard
parent94d98176ea79edc87f11456bbb295e82381fc947 (diff)
downloadjancity-e8dd951c6c2bc3f3496eec26192b9b81c062ca1a.tar.gz
Use find_package for SDL libraries
CMake already distributes FindSDL*.cmake files for SDL and SDL_mixer, which support custom prefixes via environment variables, removing the need for ad-hoc logic in Win9x builds. Also, according to FindSDL.cmake, #include <SDL.h> is the preferred way for portability reasons, instead of #include <SDL/SDL.h>, which is the option that has been used so far.
Diffstat (limited to 'src/keyboard')
-rw-r--r--src/keyboard/CMakeLists.txt2
-rw-r--r--src/keyboard/sdl-1.2/src/keyboard.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/keyboard/CMakeLists.txt b/src/keyboard/CMakeLists.txt
index 3ef79aa..5fa8892 100644
--- a/src/keyboard/CMakeLists.txt
+++ b/src/keyboard/CMakeLists.txt
@@ -6,7 +6,7 @@ if(PS1_BUILD)
set(privdeps ${privdeps} PSXSDK::PSXSDK)
elseif(SDL1_2_BUILD)
set(src ${src} "sdl-1.2/src/keyboard.c")
- set(deps ${deps} SDL)
+ set(privdeps ${privdeps} SDL::SDL)
endif()
add_library(keyboard ${src})
diff --git a/src/keyboard/sdl-1.2/src/keyboard.c b/src/keyboard/sdl-1.2/src/keyboard.c
index fafa754..a688154 100644
--- a/src/keyboard/sdl-1.2/src/keyboard.c
+++ b/src/keyboard/sdl-1.2/src/keyboard.c
@@ -1,6 +1,6 @@
#include <keyboard.h>
#include <keyboard_key.h>
-#include <SDL/SDL.h>
+#include <SDL.h>
#include <stdio.h>
static void append_key(const enum keyboard_key key, struct keyboard *const k)