forked from Gerosity/zap-client
-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
71 lines (57 loc) · 1.53 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
59
60
61
62
63
64
65
66
67
68
69
70
71
cmake_minimum_required(VERSION 3.9)
project(zap VERSION 1.1)
#No Warnings
add_definitions(-w)
# Set C++ standard to C++23
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED True)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3")
# Add the source files for ImGui
add_library(imgui STATIC
imgui/imgui.cpp
imgui/imgui_widgets.cpp
imgui/imgui_impl_opengl3.cpp
imgui/imgui_impl_glfw.cpp
imgui/imgui_draw.cpp
imgui/imgui_tables.cpp
imgui/imgui_freetype.cpp
Overlay/IconsFontAwesome5.h
)
# Set the include directories for ImGui
target_include_directories(imgui PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
)
# Find packages
find_package (X11 REQUIRED)
find_package (Freetype REQUIRED)
include_directories(${FREETYPE_INCLUDE_DIRS})
# Add additional libs
link_directories(/usr/local/lib)
# Add the executable target
add_executable(zap main.cpp)
# Link the executable against the ImGui library, GLFW/OpenGL libraries and X11 libraries
target_link_libraries(zap
imgui
glfw3
GL
X11
Xinerama
Xi
udev
${X11_LIBRARIES}
${X11_XTest_LIB}
${FREETYPE_LIBRARIES}
)
# Set the include directories for the executable
target_include_directories(zap PUBLIC
/usr/local/include
${CMAKE_CURRENT_SOURCE_DIR}/Utils
${CMAKE_CURRENT_SOURCE_DIR}/Core
${CMAKE_CURRENT_SOURCE_DIR}/Math
${CMAKE_CURRENT_SOURCE_DIR}/Features
${CMAKE_CURRENT_SOURCE_DIR}/Overlay
)
# Create a folder for Configs
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/Configs)
# Copy run.sh to build folder
file(COPY ${CMAKE_SOURCE_DIR}/run.sh DESTINATION ${CMAKE_BINARY_DIR})