2024-09-17 03:57:56 -04:00
|
|
|
cmake_minimum_required(VERSION 3.15)
|
|
|
|
|
|
|
|
project(imgui)
|
|
|
|
|
2024-09-17 04:58:28 -04:00
|
|
|
option(IMGUI_IMPL_WIN32 "Enable ImGui Win32 implementation" ON)
|
|
|
|
option(IMGUI_IMPL_OPENGL2 "Enable ImGui OpenGL2 implementation" OFF)
|
|
|
|
option(IMGUI_IMPL_OPENGL3 "Enable ImGui OpenGL3 implementation" OFF)
|
|
|
|
option(IMGUI_ENABLE_PLAYGROUND "Enable playground subdirectory" OFF)
|
|
|
|
|
2024-09-17 03:57:56 -04:00
|
|
|
set(IMGUI_INC_DIR ${CMAKE_CURRENT_SOURCE_DIR})
|
|
|
|
add_library(imgui-core STATIC)
|
|
|
|
target_sources(imgui-core PUBLIC imgui.cpp imgui_demo.cpp imgui_draw.cpp imgui_tables.cpp imgui_widgets.cpp)
|
|
|
|
target_include_directories(imgui-core PUBLIC ${IMGUI_INC_DIR})
|
|
|
|
|
|
|
|
add_subdirectory(misc)
|
2024-09-17 04:58:28 -04:00
|
|
|
add_subdirectory(backends)
|
2024-09-17 03:57:56 -04:00
|
|
|
|
|
|
|
# Playground is a private space where dev might test/experiment/freestyle stuffs
|
2024-09-17 04:58:28 -04:00
|
|
|
if(IMGUI_ENABLE_PLAYGROUND)
|
2024-09-17 03:57:56 -04:00
|
|
|
if(EXISTS playground)
|
|
|
|
add_subdirectory(playground)
|
|
|
|
endif()
|
2024-09-17 04:58:28 -04:00
|
|
|
endif()
|