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 | e8dd951c6c2bc3f3496eec26192b9b81c062ca1a (patch) | |
| tree | c209fdc85fb39499cd58925aace8e179b8998213 /src/sfx | |
| parent | 94d98176ea79edc87f11456bbb295e82381fc947 (diff) | |
| download | jancity-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/sfx')
| -rw-r--r-- | src/sfx/CMakeLists.txt | 4 | ||||
| -rw-r--r-- | src/sfx/sdl-1.2/inc/sfx/port.h | 2 | ||||
| -rw-r--r-- | src/sfx/sdl-1.2/src/sound.c | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/sfx/CMakeLists.txt b/src/sfx/CMakeLists.txt index 099e65f..f503408 100644 --- a/src/sfx/CMakeLists.txt +++ b/src/sfx/CMakeLists.txt @@ -9,8 +9,8 @@ elseif(SDL1_2_BUILD) set(src "sdl-1.2/src/sound.c") set(inc ${inc} "sdl-1.2/inc") - set(deps ${deps} SDL_mixer) - set(privdeps ${privdeps} SDL header) + set(deps ${deps} SDL::SDL_mixer) + set(privdeps ${privdeps} SDL::SDL header) endif() add_library(sfx ${src}) diff --git a/src/sfx/sdl-1.2/inc/sfx/port.h b/src/sfx/sdl-1.2/inc/sfx/port.h index 2279229..77383ad 100644 --- a/src/sfx/sdl-1.2/inc/sfx/port.h +++ b/src/sfx/sdl-1.2/inc/sfx/port.h @@ -1,7 +1,7 @@ #ifndef SFX_SDL1_2_H #define SFX_SDL1_2_H -#include <SDL/SDL_mixer.h> +#include <SDL_mixer.h> #include <stdbool.h> #ifdef __cplusplus diff --git a/src/sfx/sdl-1.2/src/sound.c b/src/sfx/sdl-1.2/src/sound.c index c7ef240..fb58477 100644 --- a/src/sfx/sdl-1.2/src/sound.c +++ b/src/sfx/sdl-1.2/src/sound.c @@ -1,8 +1,8 @@ #include <sfx.h> #include <sfx/port.h> #include <header.h> -#include <SDL/SDL.h> -#include <SDL/SDL_mixer.h> +#include <SDL.h> +#include <SDL_mixer.h> #include <stdbool.h> #include <stddef.h> #include <stdio.h> |
