cmake_minimum_required(VERSION 3.16)

project(imgui LANGUAGES CXX)
message(STATUS "BIN:${PROJECT_BINARY_DIR}")

add_subdirectory(glfw3)

set(EXAMPLE_SOURCES
imgui_demo.cpp
imgui_draw.cpp
imgui_widgets.cpp
imgui.cpp
imgui_tables.cpp
backends/imgui_impl_glfw.cpp
backends/imgui_impl_opengl3.cpp
)

include_directories(.)
include_directories(backends)
include_directories(glfw3/include)

add_executable(imgui-example main.cpp ${EXAMPLE_SOURCES})
target_link_libraries(imgui-example PRIVATE glfw)
if(MSVC)
target_link_libraries(imgui-example PRIVATE opengl32)
endif()