mirror of
https://github.com/ocornut/imgui.git
synced 2026-02-06 04:20:08 +00:00
Merge 55402fdcf4 into 7b3ad4a282
This commit is contained in:
commit
2f8a024362
27 changed files with 497 additions and 0 deletions
15
examples/example_apple_metal/CMakeLists.txt
Normal file
15
examples/example_apple_metal/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
if (TARGET imgui-metal AND TARGET imgui-osx)
|
||||
# TODO proper bundling of assets for macOS and iOS
|
||||
|
||||
add_executable (imgui_example_apple_metal
|
||||
main.mm
|
||||
)
|
||||
|
||||
target_link_libraries (imgui_example_apple_metal
|
||||
imgui-metal imgui-osx
|
||||
)
|
||||
|
||||
set_target_properties (imgui_example_apple_metal
|
||||
PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${IMGUI_EXAMPLE_OUTPUT_DIR}"
|
||||
)
|
||||
endif ()
|
||||
11
examples/example_apple_opengl2/CMakeLists.txt
Normal file
11
examples/example_apple_opengl2/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
if (TARGET imgui-osx AND TARGET imgui-opengl2)
|
||||
add_executable (imgui_example_apple_opengl2 main.mm)
|
||||
|
||||
target_link_libraries (imgui_example_apple_opengl2
|
||||
imgui-osx imgui-opengl2
|
||||
)
|
||||
|
||||
set_target_properties (imgui_example_apple_opengl2
|
||||
PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${IMGUI_EXAMPLE_OUTPUT_DIR}"
|
||||
)
|
||||
endif ()
|
||||
11
examples/example_glfw_metal/CMakeLists.txt
Normal file
11
examples/example_glfw_metal/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
if (TARGET imgui-glfw AND TARGET imgui-metal)
|
||||
add_executable (imgui_example_glfw_metal main.mm)
|
||||
|
||||
target_link_libraries (imgui_example_glfw_metal
|
||||
imgui-glfw imgui-metal
|
||||
)
|
||||
|
||||
set_target_properties (imgui_example_glfw_metal
|
||||
PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${IMGUI_EXAMPLE_OUTPUT_DIR}"
|
||||
)
|
||||
endif ()
|
||||
11
examples/example_glfw_opengl2/CMakeLists.txt
Normal file
11
examples/example_glfw_opengl2/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
if (TARGET imgui-glfw AND TARGET imgui-opengl2)
|
||||
add_executable (imgui_example_glfw_opengl2 main.cpp)
|
||||
|
||||
target_link_libraries (imgui_example_glfw_opengl2
|
||||
imgui-glfw imgui-opengl2
|
||||
)
|
||||
|
||||
set_target_properties (imgui_example_glfw_opengl2
|
||||
PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${IMGUI_EXAMPLE_OUTPUT_DIR}"
|
||||
)
|
||||
endif ()
|
||||
11
examples/example_glfw_opengl3/CMakeLists.txt
Normal file
11
examples/example_glfw_opengl3/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
if (TARGET imgui-glfw AND TARGET imgui-opengl)
|
||||
add_executable (imgui_example_glfw_opengl3 main.cpp)
|
||||
|
||||
target_link_libraries (imgui_example_glfw_opengl3
|
||||
imgui-glfw imgui-opengl
|
||||
)
|
||||
|
||||
set_target_properties (imgui_example_glfw_opengl3
|
||||
PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${IMGUI_EXAMPLE_OUTPUT_DIR}"
|
||||
)
|
||||
endif ()
|
||||
11
examples/example_glut_opengl2/CMakeLists.txt
Normal file
11
examples/example_glut_opengl2/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
if (TARGET imgui-glut AND TARGET imgui-opengl2)
|
||||
add_executable (imgui_example_glut_opengl2 main.cpp)
|
||||
|
||||
target_link_libraries (imgui_example_glut_opengl2
|
||||
imgui-glut imgui-opengl2
|
||||
)
|
||||
|
||||
set_target_properties (imgui_example_glut_opengl2
|
||||
PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${IMGUI_EXAMPLE_OUTPUT_DIR}"
|
||||
)
|
||||
endif ()
|
||||
6
examples/example_null/CMakeLists.txt
Normal file
6
examples/example_null/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
add_executable (imgui_example_null main.cpp)
|
||||
target_link_libraries (imgui_example_null imgui)
|
||||
|
||||
set_target_properties (imgui_example_null
|
||||
PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${IMGUI_EXAMPLE_OUTPUT_DIR}"
|
||||
)
|
||||
11
examples/example_sdl2_metal/CMakeLists.txt
Normal file
11
examples/example_sdl2_metal/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
if (TARGET imgui-sdl2 AND TARGET imgui-metal)
|
||||
add_executable (imgui_example_sdl2_metal main.mm)
|
||||
|
||||
target_link_libraries (imgui_example_sdl2_metal
|
||||
imgui-sdl2 imgui-metal
|
||||
)
|
||||
|
||||
set_target_properties (imgui_example_sdl2_metal
|
||||
PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${IMGUI_EXAMPLE_OUTPUT_DIR}"
|
||||
)
|
||||
endif ()
|
||||
11
examples/example_sdl2_opengl2/CMakeLists.txt
Normal file
11
examples/example_sdl2_opengl2/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
if (TARGET imgui-sdl2 AND TARGET imgui-opengl2)
|
||||
add_executable (imgui_example_sdl2_opengl2 WIN32 main.cpp)
|
||||
|
||||
target_link_libraries (imgui_example_sdl2_opengl2
|
||||
imgui-sdl2 imgui-opengl2
|
||||
)
|
||||
|
||||
set_target_properties (imgui_example_sdl2_opengl2
|
||||
PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${IMGUI_EXAMPLE_OUTPUT_DIR}"
|
||||
)
|
||||
endif ()
|
||||
11
examples/example_sdl2_opengl3/CMakeLists.txt
Normal file
11
examples/example_sdl2_opengl3/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
if (TARGET imgui-sdl2 AND TARGET imgui-opengl)
|
||||
add_executable (imgui_example_sdl2_opengl3 main.cpp)
|
||||
|
||||
target_link_libraries (imgui_example_sdl2_opengl3
|
||||
imgui-sdl2 imgui-opengl
|
||||
)
|
||||
|
||||
set_target_properties (imgui_example_sdl2_opengl3
|
||||
PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${IMGUI_EXAMPLE_OUTPUT_DIR}"
|
||||
)
|
||||
endif ()
|
||||
11
examples/example_win32_directx10/CMakeLists.txt
Normal file
11
examples/example_win32_directx10/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
if (TARGET imgui-win32 AND TARGET imgui-dx10)
|
||||
add_executable (imgui_example_win32_directx10 main.cpp)
|
||||
|
||||
target_link_libraries (imgui_example_win32_directx10
|
||||
imgui-win32 imgui-dx10
|
||||
)
|
||||
|
||||
set_target_properties (imgui_example_win32_directx10
|
||||
PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${IMGUI_EXAMPLE_OUTPUT_DIR}"
|
||||
)
|
||||
endif ()
|
||||
11
examples/example_win32_directx11/CMakeLists.txt
Normal file
11
examples/example_win32_directx11/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
if (TARGET imgui-win32 AND TARGET imgui-dx11)
|
||||
add_executable (imgui_example_win32_directx11 main.cpp)
|
||||
|
||||
target_link_libraries (imgui_example_win32_directx11
|
||||
imgui-win32 imgui-dx11
|
||||
)
|
||||
|
||||
set_target_properties (imgui_example_win32_directx11
|
||||
PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${IMGUI_EXAMPLE_OUTPUT_DIR}"
|
||||
)
|
||||
endif ()
|
||||
11
examples/example_win32_directx12/CMakeLists.txt
Normal file
11
examples/example_win32_directx12/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
if (TARGET imgui-win32 AND TARGET imgui-dx12)
|
||||
add_executable (imgui_example_win32_directx12 main.cpp)
|
||||
|
||||
target_link_libraries (imgui_example_win32_directx12
|
||||
imgui-win32 imgui-dx12
|
||||
)
|
||||
|
||||
set_target_properties (imgui_example_win32_directx12
|
||||
PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${IMGUI_EXAMPLE_OUTPUT_DIR}"
|
||||
)
|
||||
endif ()
|
||||
11
examples/example_win32_directx9/CMakeLists.txt
Normal file
11
examples/example_win32_directx9/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
if (TARGET imgui-win32 AND TARGET imgui-dx9)
|
||||
add_executable (imgui_example_win32_directx9 main.cpp)
|
||||
|
||||
target_link_libraries (imgui_example_win32_directx9
|
||||
imgui-win32 imgui-dx9
|
||||
)
|
||||
|
||||
set_target_properties (imgui_example_win32_directx9
|
||||
PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${IMGUI_EXAMPLE_OUTPUT_DIR}"
|
||||
)
|
||||
endif ()
|
||||
24
examples/libs/glfw.cmake
Normal file
24
examples/libs/glfw.cmake
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
# NOTE: These are polyfill libs for developing GLFW windows examples;
|
||||
# they are NOT intended to be used for production; instead, you
|
||||
# acquire your own version (either from pre-built binaries or
|
||||
# from building from source).
|
||||
#
|
||||
# More info at https://glfw.org.
|
||||
|
||||
if (WIN32 AND NOT TARGET glfw)
|
||||
message (
|
||||
WARNING
|
||||
"ImGui polyfill glfw target should not be used for production! "
|
||||
"If you're seeing this while building ImGui examples, please ignore."
|
||||
)
|
||||
|
||||
add_library (glfw STATIC IMPORTED)
|
||||
|
||||
if (CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
set_target_properties (glfw PROPERTIES IMPORTED_LOCATION "${CMAKE_CURRENT_LIST_DIR}/glfw/lib-vc2010-64/glfw3.lib")
|
||||
else ()
|
||||
set_target_properties (glfw PROPERTIES IMPORTED_LOCATION "${CMAKE_CURRENT_LIST_DIR}/glfw/lib-vc2010-32/glfw3.lib")
|
||||
endif ()
|
||||
|
||||
target_include_directories (glfw SYSTEM INTERFACE "${CMAKE_CURRENT_LIST_DIR}/glfw/include")
|
||||
endif ()
|
||||
Loading…
Add table
Add a link
Reference in a new issue