-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
78 lines (62 loc) · 1.84 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
cmake_minimum_required(VERSION 2.8)
project(sdl)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
if(APPLE)
message("Estoy en OSX")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I/usr/local/include -L/usr/local/lib -lSDL2")
endif()
# Agrego la libreria SDL2pp habilitando manejo de imagenes y de letras
SET(SDL2PP_WITH_IMAGE YES)
SET(SDL2PP_WITH_TTF YES)
add_subdirectory(libs/libSDL2pp)
add_subdirectory(libs/yamlcpp)
# Agrego la carpeta con los headers autogenerados a los includes
message("Agregando '${PROJECT_SOURCE_DIR}/libs' como directorio de includes")
include_directories(${PROJECT_SOURCE_DIR}/libs)
include_directories(${SDL2PP_INCLUDE_DIRS})
include_directories(${YAML_CPP_INCLUDE_DIR})
add_executable (client
src/client/client.cpp
src/client/main.cpp
src/client/renderpiece.cpp
src/client/spot.cpp
src/client/chessboard.cpp
src/client/menu.cpp
src/client/endScreen.cpp
src/server/rook.cpp
src/server/bishop.cpp
src/server/pawn.cpp
src/server/king.cpp
src/server/queen.cpp
src/server/piece.cpp
src/server/board.cpp
src/server/knight.cpp
src/server/game.cpp
src/server/blocking_queue.cpp
src/server/client.cpp
src/common/common_protocol.cpp
src/common/common_socket.cpp
)
add_executable (server
src/server/main.cpp
src/server/server.cpp
src/server/accept_thread.cpp
src/server/client.cpp
src/server/game.cpp
src/server/board.cpp
src/server/blocking_queue.cpp
# PIEZAS
src/server/piece.cpp
src/server/rook.cpp
src/server/bishop.cpp
src/server/pawn.cpp
src/server/king.cpp
src/server/queen.cpp
src/server/knight.cpp
src/common/common_protocol.cpp
src/common/common_socket.cpp
)
target_link_libraries(client ${SDL2PP_LIBRARIES})
target_link_libraries(client yaml-cpp)
file(COPY assets DESTINATION ${CMAKE_BINARY_DIR})