mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-28 02:50:06 +00:00
Add CMake project
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}).
This commit is contained in:
parent
85b2fe8486
commit
b567ffe7e0
18 changed files with 868 additions and 42 deletions
21
examples/example_null/CMakeLists.txt
Normal file
21
examples/example_null/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
cmake_minimum_required(VERSION 3.5)
|
||||
|
||||
project(example_null
|
||||
LANGUAGES CXX)
|
||||
|
||||
find_package(ImGui CONFIG REQUIRED
|
||||
COMPONENTS Core)
|
||||
|
||||
add_executable(${PROJECT_NAME} main.cpp)
|
||||
|
||||
if(EMSCRIPTEN)
|
||||
set_target_properties(${PROJECT_NAME} PROPERTIES
|
||||
SUFFIX .html)
|
||||
endif()
|
||||
|
||||
target_link_libraries(${PROJECT_NAME}
|
||||
PRIVATE ImGui::Core)
|
||||
|
||||
include(GNUInstallDirs)
|
||||
install(TARGETS ${PROJECT_NAME}
|
||||
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
|
||||
Loading…
Add table
Add a link
Reference in a new issue