mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-20 01:34:20 +00:00
Add minimal CMake setup for simplicity
This commit is contained in:
parent
e8eb8975a4
commit
63cd4d95a3
7 changed files with 35 additions and 0 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -59,3 +59,6 @@ examples/example_sdl2_metal/example_sdl2_metal
|
|||
examples/example_sdl2_opengl2/example_sdl2_opengl2
|
||||
examples/example_sdl2_opengl3/example_sdl2_opengl3
|
||||
examples/example_sdl2_sdlrenderer/example_sdl2_sdlrenderer
|
||||
|
||||
## User Playground
|
||||
playground/*
|
||||
|
|
|
|||
15
CMakeLists.txt
Normal file
15
CMakeLists.txt
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
cmake_minimum_required(VERSION 3.15)
|
||||
|
||||
project(imgui)
|
||||
|
||||
set(IMGUI_INC_DIR ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
add_library(imgui-core STATIC)
|
||||
target_sources(imgui-core PUBLIC imgui.cpp imgui_demo.cpp imgui_draw.cpp imgui_tables.cpp imgui_widgets.cpp)
|
||||
target_include_directories(imgui-core PUBLIC ${IMGUI_INC_DIR})
|
||||
|
||||
add_subdirectory(misc)
|
||||
|
||||
# Playground is a private space where dev might test/experiment/freestyle stuffs
|
||||
if(EXISTS playground)
|
||||
add_subdirectory(playground)
|
||||
endif()
|
||||
4
misc/CMakeLists.txt
Normal file
4
misc/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
add_subdirectory(cpp)
|
||||
add_subdirectory(single_file)
|
||||
add_subdirectory(fonts)
|
||||
add_subdirectory(freetype)
|
||||
3
misc/cpp/CMakeLists.txt
Normal file
3
misc/cpp/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
add_library(imgui-cpp STATIC)
|
||||
target_sources(imgui-cpp PUBLIC imgui_stdlib.cpp)
|
||||
target_include_directories(imgui-cpp PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} PRIVATE ${IMGUI_INC_DIR})
|
||||
1
misc/fonts/CMakeLists.txt
Normal file
1
misc/fonts/CMakeLists.txt
Normal file
|
|
@ -0,0 +1 @@
|
|||
add_executable(fonts-bin2compressed binary_to_compressed_c.cpp)
|
||||
7
misc/freetype/CMakeLists.txt
Normal file
7
misc/freetype/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
find_package(Freetype)
|
||||
if(Freetype_FOUND)
|
||||
add_library(imgui-freetype STATIC)
|
||||
target_include_directories(imgui-freetype PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} PRIVATE ${IMGUI_INC_DIR})
|
||||
target_sources(imgui-freetype PUBLIC imgui_freetype.cpp)
|
||||
target_link_libraries(imgui-freetype Freetype::Freetype)
|
||||
endif()
|
||||
2
misc/single_file/CMakeLists.txt
Normal file
2
misc/single_file/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
add_library(imgui-jumbo INTERFACE)
|
||||
target_include_directories(imgui-jumbo INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
Loading…
Add table
Add a link
Reference in a new issue