Add SDL2 fallback in backend_test\CMakeLists.txt

If SDL was installed using CMake, it normally goes to a location
Where it can be found by `find_package`. There is no need to force
`SDL_PATH` on users, and this commit allows building `backend_test`
Without having to specify it. Backwards compatible.
This commit is contained in:
Grim Maple
2021-12-25 22:35:30 +03:00
parent afce852875
commit d5f713caa1
2 changed files with 16 additions and 5 deletions

View File

@@ -27,7 +27,7 @@ Notes:
* cmake options are IMGUI_STATIC (compiling as static library), IMGUI_FREETYPE (for using Freetype2) and FREETYPE_PATH (Freetype2 cmake install location)
* or as in https://github.com/sonoro1234/LuaJIT-ImGui/tree/master/build
For compiling with backends there is now an example with SDL2 and opengl3 in folder backend_test. It will generate a cimgui_sdl module and a test_sdl executable. You only need to provide SDL_PATH telling cmake where to look for SDL2 cmake installation.
For compiling with backends there is now an example with SDL2 and opengl3 in folder backend_test. It will generate a cimgui_sdl module and a test_sdl executable.
# using generator