forked from cimgui/cimgui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
42 lines (35 loc) · 1.21 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
cmake_minimum_required(VERSION 3.1)
project(cimgui_bindings)
set (CMAKE_CXX_STANDARD 11)
set(BUILD_CIMPLOT "no" CACHE STRING "Enable compilation of cimplot")
set(BUILD_CIMGUIZMO "no" CACHE STRING "Enable compilation of cimguizmo")
set(IMGUI_DISABLE_OBSOLETE "no" CACHE STRING "Disable obsolete ImGui functions")
set(IMGUI_STATIC "no" CACHE STRING "Build as a static library")
set(IMGUI_FREETYPE "no" CACHE STRING "Build with freetype library")
set(IMGUI_DIR "${CMAKE_CURRENT_SOURCE_DIR}/cimgui/imgui")
if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/cimgui/imgui/imgui_tables.cpp)
set(IMGUI_TABLES_SOURCE "${IMGUI_DIR}/imgui_tables.cpp")
else()
set(IMGUI_TABLES_SOURCE "")
endif()
if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/cimgui/imgui/imgui_stacklayout.cpp)
set(IMGUI_STACKLAYOUT_SOURCE "${IMGUI_DIR}/imgui_stacklayout.cpp")
else()
set(IMGUI_STACKLAYOUT_SOURCE "")
endif()
#general settings
file(GLOB IMGUI_SOURCES
${IMGUI_DIR}/imgui.cpp
${IMGUI_DIR}/imgui_draw.cpp
${IMGUI_DIR}/imgui_demo.cpp
${IMGUI_DIR}/imgui_widgets.cpp
${IMGUI_TABLES_SOURCE}
${IMGUI_STACKLAYOUT_SOURCE}
)
add_subdirectory(cimgui)
if (BUILD_CIMPLOT)
add_subdirectory(cimplot)
endif ()
if (BUILD_CIMGUIZMO)
add_subdirectory(cimguizmo)
endif ()