# Scoped toolkit target. No toolkit types leave the private native client boundary. include_guard(GLOBAL) include("${PROJECT_SOURCE_DIR}/tools/imgui-pin.cmake") set(imgui_source "${PROJECT_SOURCE_DIR}/build/external/imgui/imgui-${EVO_IMGUI_VERSION}") if(NOT EXISTS "${imgui_source}/evo-verified.sha256") message(FATAL_ERROR "Prepare Dear ImGui explicitly: cmake -P tools/prepare-imgui.cmake") endif() file(STRINGS "${imgui_source}/evo-verified.sha256" verified_imgui) if(NOT verified_imgui STREQUAL EVO_IMGUI_SHA256) message(FATAL_ERROR "Prepared Dear ImGui does not match the reviewed source pin") endif() add_library(evo_imgui STATIC "${imgui_source}/imgui.cpp" "${imgui_source}/imgui_draw.cpp" "${imgui_source}/imgui_tables.cpp" "${imgui_source}/imgui_widgets.cpp" "${imgui_source}/backends/imgui_impl_sdl3.cpp" "${imgui_source}/backends/imgui_impl_sdlrenderer3.cpp") target_include_directories(evo_imgui SYSTEM PUBLIC "${imgui_source}" "${imgui_source}/backends") target_link_libraries(evo_imgui PRIVATE SDL3::SDL3) # Third-party source does not inherit owned warnings-as-errors/static analysis. # Instrument it during sanitizer probes, so toolkit lifecycle is checked as well. if(EVO_SANITIZER STREQUAL "address" AND NOT MSVC) target_compile_options(evo_imgui PRIVATE -fsanitize=address,undefined -fno-omit-frame-pointer) endif()