-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
58 lines (46 loc) · 1.51 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
CMAKE_MINIMUM_REQUIRED(VERSION 3.12)
project(plottings LANGUAGES CXX)
set (CMAKE_CXX_STANDARD 20)
set (CMAKE_CXX_STANDARD_REQUIRED ON)
# --- library dependencies ------------------------------------------------------
find_package(glfw3 3.3 REQUIRED)
find_package(OpenGL REQUIRED)
# -------------------------------------------------------------------------------
# --- imgui library for UI drawing ----------------------------------------------
add_library(imgui
libraries/imgui/imgui.cpp
libraries/imgui/imgui_draw.cpp
libraries/imgui/imgui_tables.cpp
libraries/imgui/imgui_widgets.cpp
libraries/imgui/backends/imgui_impl_glfw.cpp
libraries/imgui/backends/imgui_impl_opengl3.cpp
)
target_include_directories(imgui PUBLIC
libraries/imgui
libraries/imgui/backends
)
# -------------------------------------------------------------------------------
# --- implot addon for imgui for extended plotting ------------------------------
add_library(implot
libraries/implot/implot.cpp
libraries/implot/implot_items.cpp
)
target_include_directories(implot PUBLIC
libraries/implot
)
target_link_libraries(implot PRIVATE
imgui
)
# -------------------------------------------------------------------------------
# --- main application ----------------------------------------------------------
add_executable(${PROJECT_NAME}
src/main.cpp
src/ui.cpp
)
target_link_libraries(${PROJECT_NAME} PRIVATE
implot
imgui
glfw
OpenGL::GL
)
# -------------------------------------------------------------------------------