1

On Windows the name for the SDL header file is SDL.h, i.e., I have to use #include <SDL.h>, while on all other platforms it's SDL2/SDL.h, i.e., #include <SDL2/SDL.h>. How can I rename this include directory in CMake, so that I don't have to conditionally check it everywhere in my files. So instead of using this:

#if defined(_WIN32) || defined(_WIN64)
#include <SDL.h>
#else
#include <SDL2/SDL.h>
#endif

I want to simply use #include <SDL2/SDL.h> everywhere and let CMake convert the name beforehand.

Sheldon
  • 376
  • 3
  • 14

0 Answers0