-
Notifications
You must be signed in to change notification settings - Fork 49
/
CMakeLists.txt
81 lines (72 loc) · 2.21 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
cmake_minimum_required(VERSION 2.8.3)
project(odva_ethernetip)
find_package(catkin REQUIRED)
find_package(console_bridge REQUIRED)
find_package(Boost 1.47 REQUIRED COMPONENTS system)
catkin_package(
INCLUDE_DIRS include
LIBRARIES ${PROJECT_NAME}
DEPENDS Boost console_bridge
)
include_directories(
include
${Boost_INCLUDE_DIRS}
${console_bridge_INCLUDE_DIRS}
)
## Declare a cpp library for just Ethernet/IP generic stuff
add_library(${PROJECT_NAME}
src/connection.cpp
src/copy_serializable.cpp
src/cpf_item.cpp
src/cpf_packet.cpp
src/encap_header.cpp
src/encap_packet.cpp
src/identity_item_data.cpp
src/io_scanner.cpp
src/message_router_response.cpp
src/path.cpp
src/rr_data.cpp
src/session.cpp
)
target_link_libraries(${PROJECT_NAME}
${Boost_LIBRARIES}
${console_bridge_LIBRARIES}
)
## Mark executables and libraries for installation
install(TARGETS ${PROJECT_NAME}
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION})
if (CATKIN_ENABLE_TESTING)
catkin_add_gtest(${PROJECT_NAME}-test
test/serialization/buffer_writer_test.cpp
test/serialization/buffer_reader_test.cpp
test/serialization/stream_writer_test.cpp
test/serialization/stream_reader_test.cpp
test/serialization/serializable_buffer_test.cpp
test/serialization/serializable_primitive_test.cpp
test/test_socket_test.cpp
test/encap_header_test.cpp
test/encap_packet_test.cpp
test/cpf_item_test.cpp
test/cpf_packet_test.cpp
test/sequenced_address_item_test.cpp
test/identity_item_data_test.cpp
test/path_test.cpp
test/rr_data_test.cpp
test/message_router_request_test.cpp
test/message_router_response_test.cpp
test/rr_data_request_test.cpp
test/rr_data_response_test.cpp
test/forward_open_request_test.cpp
test/forward_open_success_test.cpp
test/forward_close_request_test.cpp
test/forward_close_success_test.cpp
test/session_test.cpp
test/test_main.cpp
)
target_link_libraries(${PROJECT_NAME}-test ${Boost_LIBRARIES} ${PROJECT_NAME})
endif()