1
- cmake_minimum_required (VERSION 3.8.2 )
1
+ cmake_minimum_required (VERSION 3.10 )
2
2
project (imgui VERSION 1.73.0 LANGUAGES CXX C)
3
+ set (CMAKE_CXX_STANDARD 11)
3
4
4
5
option (IMGUI_EXAMPLES "Build ImGui examples" ON )
5
6
option (IMGUI_DEMO "Include the ImGui demo window implementation in library" ON )
6
7
7
- option (IMGUI_IMPL_SDL "Build the SDL implementation (only if supported)" ON )
8
+ option (IMGUI_IMPL_SDL2 "Build the SDL implementation (only if supported)" ON )
8
9
option (IMGUI_IMPL_METAL "Build the Metal implementation (only if supported)" ${APPLE} )
9
10
option (IMGUI_IMPL_OSX "Build the OSX implementation (only if supported)" ${APPLE} )
10
11
option (IMGUI_IMPL_WIN32 "Build the Win32 (native winapi) implementation (only if supported)" ${WIN32} )
11
12
option (IMGUI_IMPL_GLFW "Build the GLFW implementation (only if supported)" ON )
12
13
option (IMGUI_IMPL_GLUT "Build the GLUT implementation (only if supported)" ON )
13
- option (IMGUI_IMPL_OPENGL "Build the OpenGL implementation (only if supported)" ON )
14
- option (IMGUI_IMPL_OPENGL2 "Build the OpenGL 2 (legacy) implementation (only if supported)" ${IMGUI_IMPL_OPENGL} )
14
+ option (IMGUI_IMPL_OPENGL "Build the OpenGL3 implementation (only if supported)" ON )
15
+ option (IMGUI_IMPL_OPENGL2 "Build the OpenGL2 (legacy) implementation (only if supported)" ${IMGUI_IMPL_OPENGL} )
15
16
option (IMGUI_IMPL_DX9 "Build the DirectX 9 implementation (only if supported)" ${WIN32} )
16
17
option (IMGUI_IMPL_DX10 "Build the DirectX 10 implementation (only if supported)" ${WIN32} )
17
18
option (IMGUI_IMPL_DX11 "Build the DirectX 11 implementation (only if supported)" ${WIN32} )
@@ -20,6 +21,7 @@ option (IMGUI_IMPL_DX12 "Build the DirectX 12 implementation (only if supported)
20
21
add_library (imgui
21
22
imgui.cpp
22
23
imgui_draw.cpp
24
+ imgui_tables.cpp
23
25
imgui_widgets.cpp
24
26
$<$<BOOL :IMGUI_DEMO>:imgui_demo.cpp>
25
27
)
@@ -28,7 +30,7 @@ add_library(imgui::imgui ALIAS imgui)
28
30
29
31
target_include_directories (imgui PUBLIC "${CMAKE_CURRENT_SOURCE_DIR} " )
30
32
31
- target_compile_features (imgui PRIVATE cxx_std_98 )
33
+ target_compile_features (imgui PRIVATE cxx_std_11 )
32
34
33
35
if (IMGUI_EXAMPLES)
34
36
# Sets up polyfill libraries for Windows examples (e.g. GLFW)
@@ -39,38 +41,38 @@ if (NOT IMGUI_DEMO)
39
41
target_compile_definitions (imgui PUBLIC -DIMGUI_DISABLE_DEMO_WINDOWS=1)
40
42
endif ()
41
43
42
- if (IMGUI_IMPL_SDL )
43
- include (examples/imgui_impl_sdl .cmake)
44
+ if (IMGUI_IMPL_SDL2 )
45
+ include (backends/imgui_impl_sdl2 .cmake)
44
46
endif ()
45
47
if (IMGUI_IMPL_METAL)
46
- include (examples /imgui_impl_metal.cmake)
48
+ include (backends /imgui_impl_metal.cmake)
47
49
endif ()
48
50
if (IMGUI_IMPL_OSX)
49
- include (examples /imgui_impl_osx.cmake)
51
+ include (backends /imgui_impl_osx.cmake)
50
52
endif ()
51
53
if (IMGUI_IMPL_WIN32)
52
- include (examples /imgui_impl_win32.cmake)
54
+ include (backends /imgui_impl_win32.cmake)
53
55
endif ()
54
56
if (IMGUI_IMPL_GLFW)
55
- include (examples /imgui_impl_glfw.cmake)
57
+ include (backends /imgui_impl_glfw.cmake)
56
58
endif ()
57
59
if (IMGUI_IMPL_OPENGL OR IMGUI_IMPL_OPENGL2)
58
- include (examples /imgui_impl_opengl.cmake)
60
+ include (backends /imgui_impl_opengl.cmake)
59
61
endif ()
60
62
if (IMGUI_IMPL_GLUT)
61
- include (examples /imgui_impl_glut.cmake)
63
+ include (backends /imgui_impl_glut.cmake)
62
64
endif ()
63
65
if (IMGUI_IMPL_DX9)
64
- include (examples /imgui_impl_dx9.cmake)
66
+ include (backends /imgui_impl_dx9.cmake)
65
67
endif ()
66
68
if (IMGUI_IMPL_DX10)
67
- include (examples /imgui_impl_dx10.cmake)
69
+ include (backends /imgui_impl_dx10.cmake)
68
70
endif ()
69
71
if (IMGUI_IMPL_DX11)
70
- include (examples /imgui_impl_dx11.cmake)
72
+ include (backends /imgui_impl_dx11.cmake)
71
73
endif ()
72
74
if (IMGUI_IMPL_DX12)
73
- include (examples /imgui_impl_dx12.cmake)
75
+ include (backends /imgui_impl_dx12.cmake)
74
76
endif ()
75
77
76
78
if (IMGUI_EXAMPLES)
@@ -86,11 +88,11 @@ if (IMGUI_EXAMPLES)
86
88
#add_subdirectory (examples/example_glfw_vulkan)
87
89
add_subdirectory (examples/example_glut_opengl2)
88
90
add_subdirectory (examples/example_null)
89
- #add_subdirectory (examples/example_sdl_directx11 )
90
- add_subdirectory (examples/example_sdl_metal )
91
- add_subdirectory (examples/example_sdl_opengl2 )
92
- add_subdirectory (examples/example_sdl_opengl3 )
93
- #add_subdirectory (examples/example_sdl_vulkan )
91
+ #add_subdirectory (examples/example_sdl2_directx11 )
92
+ add_subdirectory (examples/example_sdl2_metal )
93
+ add_subdirectory (examples/example_sdl2_opengl2 )
94
+ add_subdirectory (examples/example_sdl2_opengl3 )
95
+ #add_subdirectory (examples/example_sdl2_vulkan )
94
96
add_subdirectory (examples/example_win32_directx10)
95
97
add_subdirectory (examples/example_win32_directx11)
96
98
add_subdirectory (examples/example_win32_directx12)
0 commit comments