diff --git a/CMakeLists.txt b/CMakeLists.txt index 5687d50..fac7884 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -398,6 +398,12 @@ set(IMGUI_SOURCES ${IMGUI_DIR}/backends/imgui_impl_sdl3.cpp ) +# The ImGui demo window is unreachable in the wallet, so compile imgui_demo.cpp to its empty stubs +# (ShowDemoWindow/ShowStyleEditor/... stay defined; imgui.h declares them unconditionally, so this is ODR-safe). +# Do NOT use IMGUI_DISABLE_DEBUG_TOOLS: it changes imgui.h declarations and removes duplicate-ID highlighting. +# (Makefiles: a per-source define lands in the target's flags.make, so existing trees do one full app rebuild.) +set_source_files_properties(${IMGUI_DIR}/imgui_demo.cpp PROPERTIES COMPILE_DEFINITIONS IMGUI_DISABLE_DEMO_WINDOWS) + set(IMGUI_HEADERS ${IMGUI_DIR}/imgui.h ${IMGUI_DIR}/imconfig.h