forked from micro-ROS/embeddedRTPS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
82 lines (63 loc) · 2.96 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
cmake_minimum_required(VERSION 3.5)
project(embeddedrtps)
find_package(ament_cmake_ros REQUIRED)
find_package(microcdr REQUIRED)
set(ERTPS_MAX_HISTORY "10" CACHE STRING
"This value sets the number of history slots available for RMW subscriptions, requests and replies")
set(ERTPS_MAX_PARTICIPANTS "1" CACHE STRING "This value sets the maximum number of rtps participants.")
# TODO: fix difference between best effort and reliable writers/readers
set(ERTPS_MAX_PUBLISHERS "1" CACHE STRING "This value sets the maximum number of publishers for a domain.")
set(ERTPS_MAX_SUBSCRIPTIONS "1" CACHE STRING "This value sets the maximum number of subscriptions for a domain.")
set(ERTPS_MAX_SERVICES "1" CACHE STRING "This value sets the maximum number of services for a domain.")
set(ERTPS_MAX_CLIENTS "1" CACHE STRING "This value sets the maximum number of clients for a domain.")
set(ERTPS_TOPIC_NAME_MAX_LENGTH "200" CACHE STRING "This value sets the maximum number of characters for a topic name.")
set(ERTPS_TYPE_NAME_MAX_LENGTH "200" CACHE STRING "This value sets the maximum number of characters for a type name.")
set(ERTPS_PROXIES_PER_WRITER "10" CACHE STRING "This value sets the maximum number of matched readers per writer.")
set(ERTPS_PROXIES_PER_READER "10" CACHE STRING "This value sets the maximum number of matched writers per reader.")
set(ERTPS_MAX_UDP_CONNECTIONS "15" CACHE STRING "This value sets the maximum number of UDP connections.")
# Create source files with the define
configure_file(${PROJECT_SOURCE_DIR}/include/rtps/config.h.in
${PROJECT_SOURCE_DIR}/include/rtps/config.h)
set(${PROJECT_NAME}_sources
src/discovery/TopicData.cpp
src/discovery/ParticipantProxyData.cpp
src/discovery/SEDPAgent.cpp
src/discovery/SPDPAgent.cpp
src/messages/MessageReceiver.cpp
src/messages/MessageTypes.cpp
src/ThreadPool.cpp
src/communication/UdpDriver.cpp
src/entities/Participant.cpp
src/entities/Domain.cpp
src/entities/StatelessReader.cpp
src/storages/PBufWrapper.cpp
src/storages/SimpleHistoryCache.cpp
src/storages/HistoryCache.cpp
src/rtps.cpp
thirdparty/lwip/default_netif.c
)
add_library(${PROJECT_NAME} ${${PROJECT_NAME}_sources})
ament_target_dependencies(${PROJECT_NAME} microcdr)
target_include_directories(${PROJECT_NAME} PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/lwip>"
"$<INSTALL_INTERFACE:include>")
target_include_directories(${PROJECT_NAME} PRIVATE
"$<BUILD_INTERFACE:${microcdr_INCLUDE_DIR}>"
)
ament_export_include_directories(include)
ament_export_libraries(${PROJECT_NAME})
ament_export_targets(${PROJECT_NAME})
ament_export_include_directories(${microcdr_INCLUDE_DIR})
ament_package()
# Install includes.
install(
DIRECTORY include/
DESTINATION include
)
# Install library.
install(
TARGETS ${PROJECT_NAME} EXPORT ${PROJECT_NAME}
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin)