-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
57 lines (46 loc) · 1.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
cmake_minimum_required(VERSION 2.6)
project(robot_localization)
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR CMAKE_COMPILER_IS_GNUCXX)
include(CheckCXXCompilerFlag)
check_cxx_compiler_flag(--std=c++11 SUPPORTS_STD_CXX11)
check_cxx_compiler_flag(--std=c++0x SUPPORTS_STD_CXX01)
if(SUPPORTS_STD_CXX11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++11")
elseif(SUPPORTS_STD_CXX01)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++0x")
else()
message(ERROR "Compiler does not support --std=c++11 or --std=c++0x.")
endif()
endif()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -lpthread")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -lpthread")
include_directories("oscpack")
#TODO this is only for unix system. If you want to make it work on windows, add the right source files (win32 instead of posix folder)
set("OSCPACK_SRCS"
oscpack/ip/posix/UdpSocket.cpp
oscpack/osc/OscOutboundPacketStream.cpp
oscpack/osc/OscReceivedElements.cpp
)
set("TUIO_SRCS"
TUIO/TuioClient.cpp
TUIO/TuioContainer.cpp
TUIO/TuioBlob.cpp
TUIO/TuioDispatcher.cpp
TUIO/TuioPoint.cpp
TUIO/TuioTime.cpp
TUIO/TuioObject.cpp
TUIO/UdpReceiver.cpp
TUIO/TuioCursor.cpp
TUIO/OscReceiver.cpp
)
set("app_SRCS" main.cpp
tuio.cpp
connection.cpp
connection_listener.cpp
fitness_service.cpp
robot_path.cpp
shared_data.cpp
)
add_executable(robot_localization ${app_SRCS} ${TUIO_SRCS} ${OSCPACK_SRCS})
add_executable(client-test client-test.c)
install(TARGETS robot_localization RUNTIME DESTINATION bin)