-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathCMakeLists.txt
executable file
·97 lines (79 loc) · 2.73 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# Set a minimum CMake version
cmake_minimum_required(VERSION 3.1)
# Define project name
project(AlgoSketch)
# Look for the SFML components
find_package(SFML 2.5.1 COMPONENTS audio graphics window system REQUIRED)
# Define a list of header directories
set(HEADERS
"include/"
)
# Include the header file directories
include_directories(${HEADERS})
# Define a list of our source files
set(SOURCES
# AlgoSketch
"src/main.cpp"
# Manager headers
"src/managers/application.cpp"
"src/managers/state_manager.cpp"
"src/managers/window_manager.cpp"
"src/managers/event_manager.cpp"
"src/managers/resource_manager.cpp"
"include/managers/application.hpp"
"include/managers/state_manager.hpp"
"include/managers/window_manager.hpp"
"include/managers/event_manager"
"include/managers/resource_manager.hpp"
# State headers
"src/states/state.cpp"
"src/states/main_menu.cpp"
"src/states/new_sketch_menu.cpp"
"src/states/help_menu.cpp"
"src/states/credits_menu.cpp"
"src/states/array_algorithm_menu.cpp"
"src/states/array_sketch_menu.cpp"
"src/states/graph_algorithm_menu.cpp"
"src/states/graph_sketch_menu.cpp"
"src/states/grid_algorithm_menu.cpp"
"src/states/grid_sketch_menu.cpp"
"include/states/state.hpp"
"include/states/main_menu.hpp"
"include/states/new_sketch_menu.hpp"
"include/states/help_menu.hpp"
"include/states/credits_menu.hpp"
"include/states/array_algorithm_menu.hpp"
"include/states/array_sketch_menu.hpp"
"include/states/graph_algorithm_menu.hpp"
"include/states/graph_sketch_menu.hpp"
"include/states/grid_algorithm_menu.hpp"
"include/states/grid_sketch_menu.hpp"
# State element headers
"src/state_elements/state_element.cpp"
"src/state_elements/button.cpp"
"src/state_elements/panel.cpp"
"src/state_elements/text_form.cpp"
"include/state_elements/state_element.hpp"
"include/state_elements/button.hpp"
"include/state_elements/panel.hpp"
"include/state_elements/text_form.hpp"
# Sketch headers
"src/sketches/sketch_container.cpp"
"src/sketches/array.cpp"
"src/sketches/graph.cpp"
"src/sketches/grid.cpp"
"include/sketches/sketch_container.hpp"
"include/sketches/array.hpp"
"include/sketches/graph.hpp"
"include/sketches/grid.hpp"
)
# Set executable path to bin
set(EXECUTABLE_OUTPUT_PATH "../bin/")
# Define target executable based on the source files above
add_executable(AlgoSketch ${SOURCES})
# Add the assets to the binary folder
file(COPY
${CMAKE_CURRENT_SOURCE_DIR}/assets/
DESTINATION "../bin/assets/")
# Link executable to SFML and its dependencies
target_link_libraries(AlgoSketch sfml-audio sfml-graphics sfml-window sfml-system)