From e8dd951c6c2bc3f3496eec26192b9b81c062ca1a Mon Sep 17 00:00:00 2001 From: Xavier Del Campo Romero Date: Sat, 23 Jul 2022 04:18:22 +0200 Subject: 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 is the preferred way for portability reasons, instead of #include , which is the option that has been used so far. --- src/system/CMakeLists.txt | 1 + src/system/sdl-1.2/src/system.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'src/system') 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 #include #include -#include +#include #include #include -- cgit v1.2.3