-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
executable file
·69 lines (56 loc) · 1.54 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
cmake_minimum_required(VERSION 3.10)
project(wire-frame)
#
# CONFIG
#
set(CMAKE_CXX_STANDARD 20)
if (WIN32)
set(CMAKE_CXX_FLAGS "/W4 /EHsc")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /Zi /Od")
set(CMAKE_CXX_FLAGS_RELEASE "/O2")
else ()
set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wshadow -Weffc++")
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g3")
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -Ofast")
endif ()
#
# DEPENDENCIES
#
find_package(Threads REQUIRED)
find_package(SFML COMPONENTS system window graphics audio REQUIRED)
#
# Build
#
add_executable(
${PROJECT_NAME}
# Main
src/main.cpp
include/Config.hpp src/Config.cpp
# Core
include/wf/core/Orientation.hpp
include/wf/core/Position.hpp
include/wf/core/Line.hpp
include/wf/core/EventManager.hpp
# Graphics
include/wf/gfx/Window.hpp src/gfx/Window.cpp
include/wf/gfx/event/WindowClosed.hpp
include/wf/gfx/event/WindowKeyPressed.hpp
# 3D
include/wf/space/Scene.hpp src/space/Scene.cpp
include/wf/space/Mutator.hpp src/space/Mutator.cpp
# 3D - Shapes
include/wf/space/shape/IShape.hpp
include/wf/space/shape/Cube.hpp src/space/shape/Cube.cpp
# Utils
include/wf/utils/DistributedContainer.hpp
include/wf/utils/Randomizer.hpp src/utils/Randomizer.cpp
)
target_include_directories(
${PROJECT_NAME}
PRIVATE include
)
target_link_libraries(
${PROJECT_NAME}
PUBLIC Threads::Threads
PUBLIC sfml-system sfml-window sfml-graphics sfml-audio
)