-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
104 lines (82 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
cmake_minimum_required(VERSION 3.16.2)
project(proton)
# Settings
set(VERSION "0.0.1a1")
set(MAINTAINER "Etienne SCHMITZ <[email protected]>")
set(CMAKE_CXX_STANDARD 17)
include_directories(${CMAKE_CURRENT_SOURCE_DIR/}include)
# add_compile_options(-Wall -Wextra -pedantic -Werror)
add_compile_options(-Wall -Wextra -pedantic)
# ODE
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake-modules)
find_package(ODE REQUIRED)
# Google Protobuf
find_package(Protobuf REQUIRED)
include_directories(${Protobuf_INCLUDE_DIRS})
include_directories(${CMAKE_CURRENT_BINARY_DIR})
protobuf_generate_cpp(PROTO_SRCS PROTO_HDRS
src/proto/messages_robocup_ssl_detection.proto
src/proto/messages_robocup_ssl_geometry.proto
src/proto/messages_robocup_ssl_wrapper.proto
src/proto/messages_robocup_ssl_refbox_log.proto
src/proto/messages_robocup_ssl_robot_status.proto
src/proto/grSim_Replacement.proto
src/proto/grSim_Commands.proto
src/proto/grSim_Packet.proto
)
# Boost
find_package(Boost 1.56 REQUIRED COMPONENTS system)
if(Boost_FOUND)
include_directories(${Boost_INCLUDE_DIRS})
link_directories(${Boost_LIBRARY_DIRS})
endif(Boost_FOUND)
# Sources & Headers
SET(
SRCS
src/main.cpp
src/config.cpp
src/proton.cpp
# physics
src/physics/pworld.cpp
src/physics/pobject.cpp
src/physics/pball.cpp
src/physics/pground.cpp
src/physics/pfixedbox.cpp
src/physics/pcylinder.cpp
src/physics/pbox.cpp
# network
src/net/udp_client.cpp
src/net/udp_server.cpp
# SSL
src/ssl/world.cpp
src/ssl/robot.cpp
# src/ssl/formation.cpp
# maths
src/utils/math/point.cpp
)
SET(
HEADERS
include/config.h
include/constant.h
include/proton.h
# physics
include/physics/pworld.h
include/physics/pobject.h
include/physics/pball.h
include/physics/pground.h
include/physics/pfixedbox.h
include/physics/pcylinder.h
include/physics/pbox.h
# network
include/net/udp_client.h
include/net/udp_server.h
# SSL
include/ssl/world.h
include/ssl/robot.h
# include/ssl/formation.h
# Maths
include/utils/math/point.h
)
# executable
add_executable(proton ${SRCS} ${HEADERS} ${PROTO_SRCS} ${PROTO_HDRS})
target_link_libraries(proton ode::ode ${PROTOBUF_LIBRARIES} ${Boost_SYSTEM_LIBRARY})