mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-11 00:04:24 +00:00
Export Dear ImGui as CMake's ImGui package.
Options:
- ImGui_USER_CONFIG;
- ImGui_EXAMPLES;
- ImGui_BACKENDS;
- ImGui_MISC;
- ImGui_3RDPARTY;
- ImGui_OPENGL_LOADER;
- ImGui_FREETYPE;
- ImGui_TOOLS;
- ImGui_PACKAGE.
Export targets:
- ImGui::Core;
- ImGui::ImplGLUT;
- ImGui::ImplSDL2;
- ImGui::ImplSDLRenderer2;
- ImGui::ImplSDL3;
- ImGui::ImplSDLRenderer3;
- ImGui::ImplGlfw;
- ImGui::ImplOpenGL2;
- ImGui::ImplOpenGL3;
- ImGui::ImplVulkan;
- ImGui::FreeType;
- ImGui::StdLib;
- ImGui::BinaryToCompressedC.
Import targets from:
- build directory;
- installed package.
Examples:
- example_null;
- example_glut_opengl2
- example_sdl2_sdlrenderer2;
- example_sdl2_opengl2;
- example_sdl2_opengl3;
- example_sdl2_vulkan;
- example_sdl3_sdlrenderer3;
- example_sdl3_opengl3;
- example_sdl3_vulkan;
- example_glfw_opengl2;
- example_glfw_opengl3;
- example_glfw_vulkan.
Presets:
- vcpkg (require $env{VCPKG_ROOT});
- emscripten (inherits vcpkg and require $env{EMSCRIPTEN_ROOT}).
21 lines
838 B
CMake
21 lines
838 B
CMake
if(NOT DEFINED ImGui_FIND_COMPONENTS)
|
|
set(ImGui_FIND_COMPONENTS Core)
|
|
endif()
|
|
|
|
include("${CMAKE_CURRENT_LIST_DIR}/ImGuiTargets.cmake")
|
|
|
|
foreach(COMPONENT ${ImGui_FIND_COMPONENTS})
|
|
if(NOT ";${ImGui_AVAILABLE_COMPONENTS};" MATCHES ";${COMPONENT};")
|
|
set(ImGui_FOUND FALSE)
|
|
set(ImGui_NOT_FOUND_MESSAGE "Unavailable component: ${COMPONENT}.")
|
|
endif()
|
|
if(NOT ";${ImGui_SUPPORTED_COMPONENTS};" MATCHES ";${COMPONENT};")
|
|
set(ImGui_FOUND FALSE)
|
|
set(ImGui_NOT_FOUND_MESSAGE "Unsupported component: ${COMPONENT}.")
|
|
endif()
|
|
endforeach()
|
|
|
|
if(NOT ImGui_FOUND)
|
|
set(ImGui_NOT_FOUND_MESSAGE "${ImGui_NOT_FOUND_MESSAGE}\nSupported components: ${ImGui_SUPPORTED_COMPONENTS}.")
|
|
set(ImGui_NOT_FOUND_MESSAGE "${ImGui_NOT_FOUND_MESSAGE}\nAvailable components: ${ImGui_AVAILABLE_COMPONENTS}.")
|
|
endif()
|