Files
spice2x.github.io/src/spice2x/external/imgui/CMakeLists.txt
T
bicarus 2e2968d1bc overlay: remove dependency on d3dcompiler (#738)
## Link to GitHub Issue or related Pull Request, if one exists
Fixes #737, regressed by #707

## Description of change
ImGui backend for DX11 pulled in dependency on a specific version of
`d3dcompiler_47.dll` which is not present on stock Win7 OS image.

Change this to a runtime load of the DLL and disable the overlay if we
can't find one.

## Testing
- [x] Win11, DX11 overlay
- [x] Win11, DX9 overlay
- [x] Win7, DX9 overlay
2026-06-06 14:06:37 -07:00

32 lines
828 B
CMake

cmake_minimum_required(VERSION 3.12)
project(imgui CXX)
# dear imgui uses the C++ virtual interfaces for DirectX
remove_definitions(-DCINTERFACE)
set(IMGUI_HEADERS
imconfig.h
imgui.h
imgui_internal.h
backends/imgui_impl_dx9.h
misc/cpp/imgui_stdlib.h
)
set(IMGUI_SOURCES
imgui.cpp
imgui_draw.cpp
imgui_tables.cpp
imgui_widgets.cpp
imgui_demo.cpp
backends/imgui_impl_dx9.cpp
misc/cpp/imgui_stdlib.cpp
)
# spice2x: DX11 backend is only built for non-XP toolchains
if(NOT SPICE_XP)
list(APPEND IMGUI_HEADERS backends/imgui_impl_dx11.h)
list(APPEND IMGUI_SOURCES backends/imgui_impl_dx11.cpp)
endif()
add_library(imgui STATIC ${IMGUI_HEADERS} ${IMGUI_SOURCES})
target_include_directories(imgui PRIVATE ${PROJECT_SOURCE_DIR})