-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
41 lines (31 loc) · 1.41 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
cmake_minimum_required(VERSION 2.8.3)
project(roboteq_nxtgen_controller)
find_package(catkin REQUIRED COMPONENTS diagnostic_msgs diagnostic_updater dynamic_reconfigure roscpp sensor_msgs std_srvs trajectory_msgs)
generate_dynamic_reconfigure_options(cfg/RoboteqNxtGen.cfg)
catkin_package(
INCLUDE_DIRS include
LIBRARIES RoboteqDevice nxtgen_driver
CATKIN_DEPENDS dynamic_reconfigure roscpp
)
include_directories(include ${catkin_INCLUDE_DIRS})
# RoboteqDevice standalone library
add_library(RoboteqDevice include/api_linux/Linux/RoboteqDevice.cpp)
get_target_property(RoboteqDevice_CFLAGS RoboteqDevice COMPILE_FLAGS)
set_target_properties(RoboteqDevice PROPERTIES COMPILE_FLAGS "${CFLAGS} -include unistd.h")
target_link_libraries(RoboteqDevice ${catkin_LIBRARIES})
# ROS library
add_library(nxtgen_driver src/nxtgen_driver.cpp)
target_link_libraries(nxtgen_driver RoboteqDevice ${catkin_LIBRARIES})
add_dependencies(nxtgen_driver ${PROJECT_NAME}_gencfg)
add_executable(nxtgen_driver_node src/nxtgen_driver_node.cpp)
target_link_libraries(nxtgen_driver_node nxtgen_driver ${catkin_LIBRARIES})
add_dependencies(nxtgen_driver_node ${PROJECT_NAME}_gencfg)
install(TARGETS RoboteqDevice nxtgen_driver
DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
)
install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
)
install(TARGETS nxtgen_driver_node
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)