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.
Surprisingly, as of today (July 2022) CMake ships with FindSDL*.cmake
files for several SDL libraries such as SDL_mixer or SDL_image, but not
for SDL_gfx, so one was created, based on FindSDL_mixer.cmake.
Reference:
8a3004d5c2/Modules/FindSDL_mixer.cmake
Since libSDL.a and libSDL_mixer.a are compiled separately from this
project, some hacks had been used to get the build running. However,
this approach did not make proper use of target-level properties, which
are encouraged according to modern CMake standards over global-level
commands such as include_directories() or link_libraries().
OTOH, Win32 dependencies were being imported using link_libraries(), but
they in fact are SDL dependencies, so target_link_libraries() can be
used instead.