diff options
| author | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2022-07-23 04:18:22 +0200 |
|---|---|---|
| committer | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2022-07-23 04:23:05 +0200 |
| commit | 5829ef82c45ce2ea7ed957917346a23acbd09e86 (patch) | |
| tree | ee7b21b52359c5320a25675046623de5173fc56a /src/system | |
| parent | 37ee2c11f34c55773c2afff5f8833d4bad7e4e8b (diff) | |
| download | rts-5829ef82c45ce2ea7ed957917346a23acbd09e86.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/system')
| -rw-r--r-- | src/system/CMakeLists.txt | 1 | ||||
| -rw-r--r-- | src/system/sdl-1.2/src/system.c | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/system/CMakeLists.txt b/src/system/CMakeLists.txt index 28a7310..011aee6 100644 --- a/src/system/CMakeLists.txt +++ b/src/system/CMakeLists.txt @@ -8,6 +8,7 @@ if(PS1_BUILD) elseif(SDL1_2_BUILD) set(src "sdl-1.2/src/system.c") set(inc ${inc} "sdl-1.2/inc") + set(privdeps ${privdeps} SDL::SDL) endif() add_library(system ${src}) diff --git a/src/system/sdl-1.2/src/system.c b/src/system/sdl-1.2/src/system.c index c1a79e9..24c3e18 100644 --- a/src/system/sdl-1.2/src/system.c +++ b/src/system/sdl-1.2/src/system.c @@ -1,7 +1,7 @@ #include <gfx.h> #include <sfx.h> #include <system.h> -#include <SDL/SDL.h> +#include <SDL.h> #include <stdio.h> #include <stdlib.h> |
