-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
65 lines (51 loc) · 1.91 KB
/
Copy pathCMakeLists.txt
File metadata and controls
65 lines (51 loc) · 1.91 KB
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
# CMakeLists.txt has to be located in the project folder and cmake has to be
# executed from 'project/build' with 'cmake ../'.
cmake_minimum_required(VERSION 3.5.0)
project(robot_remote_control VERSION "0.0.9")
set(BUILD_SHARED_LIBS ON)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
find_package(PkgConfig)
######################################################## CHECK FOR ZeroMQ
pkg_check_modules(ZMQ libzmq)
######################################################## CHECK FOR UDT
pkg_check_modules(UDT "udt")
if(UDT_FOUND)
message(STATUS " Found UDT using pkg-config: ${UDT_LIBRARIES}")
else()
find_library(UDT NAMES "udt" HINTS "/usr/lib")
if(UDT)
set(UDT_FOUND true)
set(UDT_LIBRARIES ${UDT})
message(STATUS " Found UDT library: ${UDT_LIBRARIES}")
else()
add_definitions(-DTRANSPORT_UDT_UNSUPPORTED)
message(STATUS " could not find UDT library\n"
" -- compiling without out UDT support\n"
" -- apt install libudt-dev or build udt from source")
endif()
endif()
######################################################## CHECK FOR WebSocket++
find_package(websocketpp)
######################################################## CHECK FOR ZLIB
find_package(ZLIB)
######################################################## CHECK FOR cpprest
find_package(cpprestsdk)
#################################################### COLLECT SATISTICS?
set (RRC_STATISTICS ON)
if( RRC_STATISTICS )
add_definitions(-DRRC_STATISTICS)
endif( RRC_STATISTICS )
################################################### ADD SUBDIRECTORIES
add_subdirectory(src)
#set (BUILD_EXAMPLES ON)
if( BUILD_EXAMPLES )
message("Adding example directory")
add_subdirectory(examples)
endif( BUILD_EXAMPLES )
#set (BUILD_TESTS ON)
if( BUILD_TESTS )
message("Adding test directory")
add_subdirectory(test)
endif( BUILD_TESTS )