-
Notifications
You must be signed in to change notification settings - Fork 8
/
CMakeLists.txt
51 lines (42 loc) · 1.54 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
# 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.1.0)
project(robot_remote_control VERSION "0.0.9")
set(BUILD_SHARED_LIBS ON)
######################################################## CHECK FOR UDT
find_package(PkgConfig)
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 ZLIB
find_package(ZLIB)
#################################################### 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 )