-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
58 lines (49 loc) · 1.77 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.16)
project(SystemMonitor)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_FLAGS "-g -D CMAKE_CXX_COMPILER=g++-9.3.0")
#make an imgui folder and put all of these files in the imgui folder
set(IMGUI_SRC
vendor/imgui/imgui_impl_opengl3.h
vendor/imgui/imgui_impl_opengl3.cpp
vendor/imgui/imgui_impl_opengl3_loader.h
vendor/imgui/imgui_impl_glfw.h
vendor/imgui/imgui_impl_glfw.cpp
vendor/imgui/imgui.h
vendor/imgui/imgui.cpp
vendor/imgui/imgui_draw.cpp
vendor/imgui/imgui_tables.cpp
vendor/imgui/imgui_widgets.cpp
# vendor/imgui1/imgui_demo.cpp
)
set(SYSTEM_INFORMATION
src/SystemInformation.cpp
src/SystemInformation.h
)
set(HELPER
src/Helper.cpp
src/Helper.h
)
set(FORMATTING
src/Formatting.cpp
src/Formatting.h
)
set(DISPLAY_INFORMATION
src/DisplayInformation.cpp
src/DisplayInformation.h
)
#Create the executable and link against all the files provided to us by ImGui
add_executable(SystemMonitor src/main.cpp
${IMGUI_SRC}
${SYSTEM_INFORMATION}
${HELPER}
${FORMATTING}
${DISPLAY_INFORMATION}
)
include_directories("${CMAKE_SOURCE_DIR}/vendor/imgui"
"${CMAKE_SOURCE_DIR}/vendor/imgui/backends/"
"${CMAKE_SOURCE_DIR}/src/"
)
# https://stackoverflow.com/questions/17768008/how-to-build-install-glfw-3-and-use-it-in-a-linux-project
# Above link gave me all the libraries that I needed for GLFW
target_link_libraries(SystemMonitor glfw3 GL GLU X11 Xxf86vm Xrandr pthread Xi dl Xinerama Xcursor)