aboutsummaryrefslogtreecommitdiff
path: root/3rdparty/imgui
diff options
context:
space:
mode:
authorrtk0c <[email protected]>2021-03-28 15:13:05 -0700
committerrtk0c <[email protected]>2021-03-28 15:31:35 -0700
commita7e5e42a188f9e6ab13706a15e6b50f36f0e00e8 (patch)
tree61545e68e1186be3900303ded6d12086c345af3f /3rdparty/imgui
parentbdcc81822adddf2c6ad7f10d9e090d913475c1e0 (diff)
Fix backend compiling/loading mechanism
Diffstat (limited to '3rdparty/imgui')
-rw-r--r--3rdparty/imgui/CMakeLists.txt66
1 files changed, 3 insertions, 63 deletions
diff --git a/3rdparty/imgui/CMakeLists.txt b/3rdparty/imgui/CMakeLists.txt
index 3382d72..7f66b97 100644
--- a/3rdparty/imgui/CMakeLists.txt
+++ b/3rdparty/imgui/CMakeLists.txt
@@ -10,73 +10,13 @@ set(IMGUI_SOURCES
imstb_rectpack.h
imstb_textedit.h
imstb_truetype.h
-
- # Since we only use GLFW to manage windows, application can't be built without GLFW
- backend/imgui_impl_glfw.h
- backend/imgui_impl_glfw.cpp
)
-option(IMGUI_INCLUDE_OPENGL2_BACKEND ON)
-if(IMGUI_INCLUDE_OPENGL2_BACKEND)
- message("ImGui: - building with OpenGL2 backend")
- list(APPEND IMGUI_SOURCES
- backend/imgui_impl_opengl2.h
- backend/imgui_impl_opengl2.cpp
- )
-endif()
-
-option(IMGUI_INCLUDE_OPENGL3_BACKEND ON)
-if(IMGUI_INCLUDE_OPENGL3_BACKEND)
- message("ImGui: - building with OpenGL3 backend")
- list(APPEND IMGUI_SOURCES
- backend/imgui_impl_opengl3.h
- backend/imgui_impl_opengl3.cpp
- )
-endif()
-
-option(IMGUI_INCLUDE_VULKAN_BACKEND ON)
-if(IMGUI_INCLUDE_VULKAN_BACKEND)
- message("ImGui: - building with Vulkan backend")
- list(APPEND IMGUI_SOURCES
- backend/imgui_impl_vulkan.h
- backend/imgui_impl_vulkan.cpp
- )
-endif()
-
-if(WIN32)
- option(IMGUI_INCLUDE_DX11_BACKEND ON)
- if(IMGUI_INCLUDE_DX11_BACKEND)
- message("ImGui: - building with DirectX11 backend")
- list(APPEND IMGUI_SOURCES
- backend/imgui_impl_dx11.h
- backend/imgui_impl_dx11.cpp
- )
- endif()
-
- option(IMGUI_INCLUDE_DX12_BACKEND ON)
- if(IMGUI_INCLUDE_DX12_BACKEND)
- message("ImGui: - building with DirectX12 backend")
- list(APPEND IMGUI_SOURCES
- backend/imgui_impl_dx12.h
- backend/imgui_impl_dx12.cpp
- )
- endif()
-elseif(APPLE)
- option(IMGUI_INCLUDE_METAL_BACKEND ON)
- if(IMGUI_INCLUDE_METAL_BACKEND)
- message("ImGui: - building with Metal backend")
- list(APPEND IMGUI_SOURCES
- backend/imgui_impl_metal.h
- backend/imgui_impl_metal.mm
- )
- endif()
-endif()
+# We don't build the files in backend/ because they are included by various entrypoint implementations
+# depending on build flags. Technically it is possible to write then here too, but doing so would require repeating
+# the build flags twice both in here and in core/CMakeLists.txt
add_library(imgui ${IMGUI_SOURCES})
-target_compile_definitions(imgui
-PRIVATE
- IMGUI_IMPL_OPENGL_LOADER_GLAD=1
-)
target_include_directories(imgui
PRIVATE
${CMAKE_SOURCE_DIR}/3rdparty/imgui