1 | initial version |
To rename an include file from SDL.h to SDL2/SDL.h using CMake in C programming, follow these steps:
Open the CMakeLists.txt file in your project's root directory.
Replace the following line:
include_directories(${SDL2_INCLUDE_DIRS})
with:
include_directories(${SDL2_INCLUDE_DIRS}/SDL2)
In any files that include the SDL.h header, replace the following line:
#include <SDL.h>
with:
#include <SDL2/SDL.h>
Save your changes and rebuild the project.