-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
53 lines (44 loc) · 1 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
cmake_minimum_required(VERSION 3.10)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_CXX_FLAGS, "-O2")
set(CMAKE_CXX_FLAGS_DEBUG, "-O2")
set(CMAKE_CXX_FLAGS_RELEASE, "-O2")
# set the project name
project(VirtualChessboard)
# add pieces
add_library(
Pieces
src/Pieces/Piece.cpp
src/Pieces/Knight.cpp
src/Pieces/King.cpp
src/Pieces/Rook.cpp
src/Pieces/Pawn.cpp
src/Pieces/Bishop.cpp
src/Pieces/Queen.cpp
)
# add players
add_library(
Players
src/Players/HumanPlayer.cpp
src/Players/ComputerPlayer.cpp
src/Players/ReplayPlayer.cpp
)
# add the executable
add_executable(
scacchiera
src/main.cpp
src/Board.cpp
src/GameManager.cpp
)
add_executable(
replay
src/Replay.cpp
src/Board.cpp
src/ReplayManager.cpp
)
target_link_libraries(scacchiera PUBLIC Pieces)
target_link_libraries(scacchiera PUBLIC Players)
target_link_libraries(replay PUBLIC Pieces)
target_link_libraries(replay PUBLIC Players)