-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathCMakeLists.txt
51 lines (45 loc) · 1.24 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
cmake_minimum_required(VERSION 3.0.2)
project(ros_control_robot)
# Load catkin and all dependencies required for this package
find_package(catkin REQUIRED COMPONENTS
roscpp
combined_robot_hw
std_msgs
controller_manager
ros_ethercat_model
realtime_tools
diagnostic_updater
diagnostic_msgs
pluginlib
cmake_modules
)
find_package(TinyXML REQUIRED)
include_directories(
${catkin_INCLUDE_DIRS}
${TinyXML_INCLUDE_DIRS}
)
catkin_package(
DEPENDS
CATKIN_DEPENDS
roscpp
combined_robot_hw
std_msgs
controller_manager
ros_ethercat_model
realtime_tools
diagnostic_updater
diagnostic_msgs
pluginlib
)
SET(GCC_NEWDTAGS_LINK_FLAGS "-Wl,--disable-new-dtags")
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${GCC_NEWDTAGS_LINK_FLAGS}")
set (CMAKE_CXX_STANDARD 11)
add_executable(${PROJECT_NAME} src/main.cpp)
target_link_libraries(${PROJECT_NAME} rt ${catkin_LIBRARIES} ${TinyXML_LIBRARIES})
add_dependencies(${PROJECT_NAME} ${catkin_EXPORTED_TARGETS})
ros_enable_rpath(${PROJECT_NAME})
install(TARGETS ${PROJECT_NAME}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
)