-
Notifications
You must be signed in to change notification settings - Fork 22
/
CMakeLists.txt
43 lines (34 loc) · 1.11 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)
#general settings
file(GLOB IMGUI_SOURCES
../cimgui/cimgui.cpp
../cimgui/imgui/imgui.cpp
../cimgui/imgui/imgui_draw.cpp
../cimgui/imgui/imgui_demo.cpp
../cimgui/imgui/imgui_widgets.cpp
../cimgui/imgui/imgui_tables.cpp
cimplot.cpp
implot/implot.cpp
implot/implot_demo.cpp
implot/implot_items.cpp
)
set(IMGUI_STATIC "no" CACHE STRING "Build as a static library")
set(CMAKE_CXX_STANDARD 11)
#add library and link
if (IMGUI_STATIC)
add_library(cimgui STATIC ${IMGUI_SOURCES})
else (IMGUI_STATIC)
add_library(cimgui SHARED ${IMGUI_SOURCES})
endif (IMGUI_STATIC)
target_compile_definitions(cimgui PUBLIC IMGUI_DISABLE_OBSOLETE_FUNCTIONS=1)
target_include_directories(cimgui PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/implot)
target_include_directories(cimgui PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../cimgui/imgui)
target_include_directories(cimgui PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../cimgui)
set_target_properties(cimgui PROPERTIES PREFIX "")
#install
install(TARGETS cimgui
RUNTIME DESTINATION .
LIBRARY DESTINATION .
ARCHIVE DESTINATION .
)