forked from Nexilist/xap-client
-
Notifications
You must be signed in to change notification settings - Fork 41
/
CMakeLists.txt
65 lines (53 loc) · 1.45 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
cmake_minimum_required(VERSION 3.9)
project(zapclient VERSION 0.1)
#No Warnings
add_definitions(-w)
# Set C++ standard to C++23
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED True)
# 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
)
# Set the include directories for ImGui
target_include_directories(imgui PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
)
# Find packages
find_package (X11 REQUIRED)
# Add additional libs
link_directories(/usr/local/lib)
# Add the executable target
add_executable(zapclient zap.cpp)
# Link the executable against the ImGui library, GLFW/OpenGL libraries and X11 libraries
target_link_libraries(zapclient
imgui
glfw3
GL
X11
Xinerama
Xi
udev
${X11_LIBRARIES}
${X11_XTest_LIB}
)
# Set the include directories for the executable
target_include_directories(zapclient 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 Configs Folder To Build Folder
file(COPY ${CMAKE_SOURCE_DIR}/Configs DESTINATION ${CMAKE_BINARY_DIR})
# Copy run.sh to build folder
file(COPY ${CMAKE_SOURCE_DIR}/run.sh DESTINATION ${CMAKE_BINARY_DIR})