forked from tork-a/cosmotechs_driver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
106 lines (82 loc) · 2.97 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
cmake_minimum_required(VERSION 2.8.3)
project(cosmotechs_driver)
## Add support for C++11, supported in ROS Kinetic and newer
# add_definitions(-std=c++11)
## Find catkin macros and libraries
find_package(catkin REQUIRED COMPONENTS
roscpp
rospy
actionlib
actionlib_msgs
message_generation
)
## Uncomment this if the package has a setup.py.
catkin_python_setup()
################################################
## Declare ROS messages, services and actions ##
################################################
add_service_files(DIRECTORY srv)
add_action_files(DIRECTORY action)
generate_messages(DEPENDENCIES std_msgs actionlib_msgs)
################################################
## Declare ROS dynamic reconfigure parameters ##
################################################
# generate_dynamic_reconfigure_options(
# cfg/DynReconf1.cfg
# cfg/DynReconf2.cfg
# )
###################################
## catkin specific configuration ##
###################################
catkin_package(INCLUDE_DIRS include)
###########
## Build ##
###########
include_directories(
include
${catkin_INCLUDE_DIRS}
)
## Declare a C++ executable
add_executable(pcio32ha_node src/pcio32ha_node.cpp)
add_executable(pcpg23i_node src/pcpg23i_node.cpp)
## Rename C++ executable without prefix
# set_target_properties(${PROJECT_NAME}_node PROPERTIES OUTPUT_NAME node PREFIX "")
## Add cmake target dependencies of the executable
add_dependencies(pcio32ha_node ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
add_dependencies(pcpg23i_node ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
## Specify libraries to link a library or executable target against
target_link_libraries(pcio32ha_node ${catkin_LIBRARIES} ${PROJECT_SOURCE_DIR}/lib/libPcio32ha.so)
target_link_libraries(pcpg23i_node ${catkin_LIBRARIES} ${PROJECT_SOURCE_DIR}/lib/libPcpg23i.so)
#############
## Install ##
#############
## Mark executable scripts (Python etc.) for installation
# install(PROGRAMS
# scripts/my_python_script
# DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
# )
## Mark executables and/or libraries for installation
install(TARGETS pcio32ha_node pcpg23i_node
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
## Mark cpp header files for installation
install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION})
install(DIRECTORY launch
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
#############
## Testing ##
#############
if (CATKIN_ENABLE_TESTING)
find_package(rostest REQUIRED)
add_rostest(test/cosmotechs.test)
endif()
## Add gtest based cpp test target and link libraries
# catkin_add_gtest(${PROJECT_NAME}-test test/test_cosmotechs_driver.cpp)
# if(TARGET ${PROJECT_NAME}-test)
# target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME})
# endif()
## Add folders to be run by python nosetests
# catkin_add_nosetests(test)