forked from RoboCup-SSL/ssl-vision
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
181 lines (143 loc) · 4.56 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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
project(ssl-vision)
cmake_minimum_required(VERSION 2.6)
#defines
add_definitions(-D UNIX)
add_definitions(-D LINUX)
add_definitions(-D _GNU_SOURCE)
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
set (QT_USE_QTNETWORK true)
set (QT_USE_QTOPENGL true)
find_package ( Qt4 REQUIRED )
include_directories(${PROJECT_BINARY_DIR})
find_package( Eigen3 REQUIRED )
include_directories(${EIGEN3_INCLUDE_DIR})
include ( ${QT_USE_FILE} )
include(src/shared/CMakeLists.txt.inc)
include_directories(${PROJECT_SOURCE_DIR}/src/app)
include_directories(${PROJECT_SOURCE_DIR}/src/app/gui)
include_directories(${PROJECT_SOURCE_DIR}/src/app/plugins)
include_directories(${PROJECT_SOURCE_DIR}/src/app/stacks)
set (SRCS
src/app/capture_thread.cpp
src/app/framedata.cpp
src/app/main.cpp
src/app/gui/cameracalibwidget.cpp
src/app/gui/colorpicker.cpp
src/app/gui/glLUTwidget.cpp
src/app/gui/glwidget.cpp
src/app/gui/lutwidget.cpp
src/app/gui/mainwindow.cpp
src/app/gui/realtimedisplaywidget.cpp
src/app/gui/renderoptions.cpp
src/app/gui/videowidget.cpp
src/app/gui/jog_dial.cpp
src/app/plugins/plugin_cameracalib.cpp
src/app/plugins/plugin_colorcalib.cpp
src/app/plugins/plugin_colorthreshold.cpp
src/app/plugins/plugin_detect_balls.cpp
src/app/plugins/plugin_detect_robots.cpp
src/app/plugins/plugin_find_blobs.cpp
src/app/plugins/plugin_publishgeometry.cpp
src/app/plugins/plugin_legacypublishgeometry.cpp
src/app/plugins/plugin_runlength_encode.cpp
src/app/plugins/plugin_sslnetworkoutput.cpp
src/app/plugins/plugin_legacysslnetworkoutput.cpp
src/app/plugins/plugin_visualize.cpp
src/app/plugins/plugin_dvr.cpp
src/app/plugins/visionplugin.cpp
src/app/stacks/multistack_robocup_ssl.cpp
src/app/stacks/multivisionstack.cpp
src/app/stacks/stack_robocup_ssl.cpp
src/app/stacks/visionstack.cpp
)
qt4_wrap_cpp (MOC_SRCS
src/app/capture_thread.h
src/app/gui/cameracalibwidget.h
src/app/gui/glLUTwidget.h
src/app/gui/glwidget.h
src/app/gui/lutwidget.h
src/app/gui/mainwindow.h
src/app/gui/videowidget.h
src/app/gui/jog_dial.h
src/shared/util/lut3d.h
src/app/plugins/plugin_dvr.h
src/app/plugins/plugin_publishgeometry.h
src/app/plugins/plugin_legacypublishgeometry.h
src/app/plugins/visionplugin.h
src/app/stacks/multistack_robocup_ssl.h
)
qt4_wrap_ui (UI_SRCS
src/app/gui/mainwindow.ui
src/app/gui/videowidget.ui
)
qt4_add_resources(RC_SRCS
src/app/gui/icons/icons_gui.qrc
${SHARED_RC}
)
## generate moc files for graphicalClient
qt4_wrap_cpp(LCLIENT_MOC_SRCS
src/logClient/CentralWindow.h
src/logClient/ClientThreading.h
src/logClient/GraphicsPrimitives.h
src/logClient/LogControl.h
)
## generate moc files for graphicalClient2
qt4_wrap_cpp(GCLIENT_MOC_SRCS
src/graphicalClient/soccerview.h
)
## shared qt wrappings
qt4_wrap_cpp (SHARED_MOC_SRCS
${SHARED_HEADERS}
)
qt4_add_resources(SHARED_RC_SRCS
${SHARED_RC}
)
set (arch ${CMAKE_SYSTEM_PROCESSOR})
message (STATUS "Build Type: ${CMAKE_BUILD_TYPE}")
message (STATUS "Arch: ${arch}")
if (${arch} MATCHES "x86_64")
#set compiler flags here for x86_64
set (cc_flags "")
elseif (${arch} MATCHES "x86")
#set compiler flags here for x86
set (cc_flags "")
endif()
#flags to set in debug mode
set (CMAKE_CXX_FLAGS_DEBUG "-g -Wl,--no-as-needed")
#flags to set in release mode
set (CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG -O3 -march=native -Wl,--no-as-needed")
message( STATUS "CC Flags: ${CMAKE_CXX_FLAGS_RELEASE}")
message (STATUS "Custom CC Flags: ${cc_flags}")
add_definitions(${cc_flags})
set (libs ${QT_LIBRARIES} ${EIGEN3_LIBRARIES} dc1394 jpeg png protobuf pthread GL GLU )
## build the common code
add_library(sslvision ${SHARED_MOC_SRCS} ${SHARED_RC_SRCS} ${CC_PROTO} ${SHARED_SRCS})
add_dependencies(sslvision GenerateProto )
target_link_libraries(sslvision ${libs})
set (libs ${libs} sslvision)
## build the main app
set (target vision)
add_executable(${target} ${UI_SRCS} ${MOC_SRCS} ${RC_SRCS} ${SRCS})
target_link_libraries(${target} ${libs})
##build non graphical client
set (client client)
add_executable(${client} src/client/main.cpp )
target_link_libraries(${client} ${libs})
##build logging client
set (lclient logClient)
add_executable(${lclient} ${LCLIENT_MOC_SRCS}
src/logClient/main.cpp
src/logClient/CentralWindow.cpp
src/logClient/ClientThreading.cpp
src/logClient/GraphicsPrimitives.cpp
src/logClient/LogControl.cpp
)
target_link_libraries(${lclient} ${libs})
##build graphical client
set (gclient graphicalClient)
add_executable(${gclient} ${GCLIENT_MOC_SRCS}
src/graphicalClient/main.cpp
src/graphicalClient/soccerview.cpp
src/graphicalClient/gltext.cpp
)
target_link_libraries(${gclient} ${libs})