2022-11-09 05:08:58 +08:00
|
|
|
include(FetchContent)
|
|
|
|
FetchContent_Declare(
|
|
|
|
imgui
|
2023-06-23 16:44:06 +08:00
|
|
|
GIT_REPOSITORY https://github.com/ocornut/imgui.git
|
2023-12-21 23:01:47 +08:00
|
|
|
GIT_TAG v1.90
|
2022-11-09 05:08:58 +08:00
|
|
|
GIT_PROGRESS TRUE
|
|
|
|
)
|
|
|
|
message("ImGui")
|
|
|
|
FetchContent_GetProperties(imgui)
|
|
|
|
if(NOT imgui_POPULATED)
|
|
|
|
FetchContent_Populate(imgui)
|
|
|
|
|
|
|
|
file(GLOB SRC_IMGUI
|
|
|
|
"${imgui_SOURCE_DIR}/*.cpp"
|
2022-11-29 00:27:43 +08:00
|
|
|
"${imgui_SOURCE_DIR}/backends/imgui_impl_win32.cpp"
|
|
|
|
"${imgui_SOURCE_DIR}/backends/imgui_impl_dx11.cpp"
|
|
|
|
"${imgui_SOURCE_DIR}/misc/cpp/imgui_stdlib.cpp"
|
2022-11-09 05:08:58 +08:00
|
|
|
)
|
|
|
|
|
2023-04-06 01:54:29 +08:00
|
|
|
add_library(imgui STATIC ${SRC_IMGUI} )
|
|
|
|
source_group(TREE ${imgui_SOURCE_DIR} PREFIX "imgui" FILES ${SRC_IMGUI})
|
2022-11-09 05:08:58 +08:00
|
|
|
target_include_directories(imgui PRIVATE
|
|
|
|
"${imgui_SOURCE_DIR}"
|
|
|
|
"${imgui_SOURCE_DIR}/backends"
|
|
|
|
"${imgui_SOURCE_DIR}/misc/cpp"
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
set_property(TARGET imgui PROPERTY CXX_STANDARD 23)
|