-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
51 lines (42 loc) · 966 Bytes
/
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
cmake_minimum_required(VERSION 3.14)
project(TicTacToe VERSION 0.1.0 LANGUAGES C CXX)
add_definitions("-g -Wall")
set(CMAKE_CXX_STANDARD 17)
add_library(
tictactoe
src/tictactoe/game.cpp
src/tictactoe/game.hpp
src/tictactoe/server.cpp
src/tictactoe/server.hpp
src/tictactoe/argparse.cpp
src/tictactoe/argparse.hpp
src/tictactoe/serializable.hpp
src/tictactoe/serializable.cpp
src/tictactoe/game_messages.hpp
src/tictactoe/game_messages.cpp
src/tictactoe/socket_address.hpp
src/tictactoe/socket_address.cpp
src/tictactoe/client.hpp
src/tictactoe/client.cpp
)
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
target_link_libraries(tictactoe PUBLIC Threads::Threads)
add_executable(
server
src/server.cpp
)
target_link_libraries(
server
PRIVATE
tictactoe
)
add_executable(
client
src/client.cpp
)
target_link_libraries(
client
PRIVATE
tictactoe
)