-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
110 lines (90 loc) · 2.33 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
98
99
100
101
102
103
104
105
106
107
108
109
110
cmake_minimum_required(VERSION 3.10)
set(GAME tsl)
project(${GAME}
VERSION 0.1
)
include(GNUInstallDirs)
find_package(gf REQUIRED COMPONENTS graphics net)
find_package(SFML REQUIRED COMPONENTS audio)
if (UNIX)
message(STATUS ">>> Unix")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -O3")
find_package(PkgConfig REQUIRED)
pkg_check_modules(SFML2 REQUIRED sfml-audio>=2.1)
elseif (WIN32)
message(STATUS ">>> Win")
find_package(SFML 2.1 REQUIRED COMPONENTS audio)
set(SFML2_LIBRARIES "sfml-audio")
endif ()
# set(GAME_DATADIR "${CMAKE_INSTALL_PREFIX}/share/games/${GAME}" CACHE PATH "Game Data Dir")
# configure_file(${CMAKE_CURRENT_SOURCE_DIR}/code/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h @ONLY)
if(NOT MSVC)
message(STATUS ">>> MSCV")
add_definitions(-Wall -Wextra -g -pedantic)
else ()
message(STATUS ">>> NOT MSCV")
add_definitions(/DNOMINMAX /W4 /utf-8 /permissive-)
endif()
add_executable(client_tsl
client/AudioManager.cpp
client/Singletons.cpp
client/client.cpp
client/Network.cpp
model/Piece.cpp
model/Plateau.cpp
model/Case.cpp
model/Card.cpp
model/Deck.cpp
model/CardFunction.cpp
model/CardFunctionChooseCases.cpp
model/GamePhase.cpp
client/GameHub.cpp
client/GameData.cpp
client/Scene/StartScene.cpp
client/Scene/MenuScene.cpp
client/Scene/PlaySelectScene.cpp
client/Scene/GameScene.cpp
client/Scene/RulesScene.cpp
client/Scene/QuitScene.cpp
client/Scene/DownloadScene.cpp
client/Scene/SettingsScene.cpp
client/Scene/ZoomCardScene.cpp
client/Entity/BoardEntity.cpp
client/Entity/TableBoardEntity.cpp
client/Entity/PlayTitleEntity.cpp
client/Entity/TitleEntity.cpp
client/Entity/RulesEntity.cpp
client/Entity/MainEntity.cpp
client/Entity/PoseEntity.cpp
client/Entity/CardEntity.cpp
client/Entity/SettingsEntity.cpp
)
add_executable(server_tsl
server/server.cpp
model/Plateau.cpp
model/Case.cpp
model/Card.cpp
model/Deck.cpp
model/Piece.cpp
model/CardFunction.cpp
model/CardFunctionChooseCases.cpp
server/AnnexFctServer.cpp
model/GamePhase.cpp
)
target_link_libraries(client_tsl
PRIVATE
gf::graphics
gf::net
${SFML2_LIBRARIES}
)
target_link_libraries(server_tsl
PRIVATE
gf::net
)
install(
TARGETS server_tsl client_tsl
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
)
# tools
# add_executable(tiles code/tiles.cc)
# target_link_libraries(tiles gf::core)