1
0
Fork 0
mirror of https://github.com/ocornut/imgui.git synced 2026-02-06 04:20:08 +00:00
This commit is contained in:
Josh Junon 2026-01-07 23:16:22 +00:00 committed by GitHub
commit 2f8a024362
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
27 changed files with 497 additions and 0 deletions

View 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 ()

View 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 ()

View 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 ()

View 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 ()

View 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 ()

View 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 ()

View 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}"
)

View 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 ()

View 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 ()

View 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 ()

View 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 ()

View 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 ()

View 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 ()

View 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
View 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 ()