1
0
Fork 0

Debug: Introduce Dear ImGui interfaces

Introduce Dear ImGui to the CMakeBuild, allow building without it.

Add two debug interfaces : one FPS counter and frame time graph,
one map visualizer and editor.
This commit is contained in:
trotFunky 2024-01-26 23:05:11 +00:00
parent 52fdd8328f
commit f25a649144
3 changed files with 160 additions and 8 deletions

View file

@ -11,8 +11,28 @@ if(NOT SFML_FOUND)
message(FATAL_ERROR "SFML could not be found")
endif()
add_executable(raycasting main.cpp Player.cpp Player.h World.cpp World.h)
target_link_libraries(raycasting
set(LIBS
sfml-window
sfml-graphics)
sfml-graphics)
find_package(ImGui QUIET)
find_package(ImGui-SFML QUIET)
if(NOT ImGui_FOUND OR NOT ImGui-SFML_FOUND OR NO_IMGUI)
message("*Not* building with ImGui")
else ()
message("Building with ImGui")
add_compile_definitions(IMGUI)
set(LIBS ${LIBS}
ImGui-SFML::ImGui-SFML)
endif()
add_compile_options(-Wall -Wextra)
add_executable(raycasting
main.cpp
Player.cpp
World.cpp
)
target_link_libraries(raycasting ${LIBS})