diff options
Diffstat (limited to '3rdparty')
-rw-r--r-- | 3rdparty/imgui/CMakeLists.txt | 85 | ||||
-rw-r--r-- | 3rdparty/imnodes/CMakeLists.txt | 12 |
2 files changed, 93 insertions, 4 deletions
diff --git a/3rdparty/imgui/CMakeLists.txt b/3rdparty/imgui/CMakeLists.txt index 191f1ea..3382d72 100644 --- a/3rdparty/imgui/CMakeLists.txt +++ b/3rdparty/imgui/CMakeLists.txt @@ -1,2 +1,83 @@ -file(GLOB_RECURSE IMGUI_SOURCES ${CMAKE_CURRENT_LIST_DIR}/*.cpp) -add_library(imgui IMGUI_SOURCES) +set(IMGUI_SOURCES + imgui.h + imgui.cpp + imconfig.h + imgui_internal.h + imgui_demo.cpp + imgui_draw.cpp + imgui_tables.cpp + imgui_widgets.cpp + 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() + +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 +) diff --git a/3rdparty/imnodes/CMakeLists.txt b/3rdparty/imnodes/CMakeLists.txt index 16b007a..bb1290c 100644 --- a/3rdparty/imnodes/CMakeLists.txt +++ b/3rdparty/imnodes/CMakeLists.txt @@ -1,2 +1,10 @@ -file(GLOB_RECURSE IMNODES_SOURCES ${CMAKE_CURRENT_LIST_DIR}/*.cpp) -add_library(imnodes IMNODES_SOURCES) +set(IMNODES_SOURCES + imnodes.h + imnodes.cpp +) + +add_library(imnodes ${IMNODES_SOURCES}) +target_include_directories(imnodes PRIVATE + ${CMAKE_SOURCE_DIR}/3rdparty/imnodes + ${CMAKE_SOURCE_DIR}/3rdparty/imgui +) |