ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Unknown CMake command "target_link_libaries" [closed]

asked 2016-12-16 19:17:17 -0600

boone gravatar image

updated 2016-12-16 19:17:44 -0600

I've been banging my head against this build error.

This is in ROS Indigo, Ubuntu 14 LTS. Cmake version is 2.8.12 (I edited every CMakelists.txt I could find to upgrade the version from 2.8.3 - apparently that's when they introduced target_link_libaries() )

Here's my CMakelists.txt:

cmake_minimum_required(VERSION 2.8.12)
project(arm_control)

find_package(catkin REQUIRED COMPONENTS
  roscpp
  moveit_ros_planning
)

catkin_package(
  LIBRARIES ${PROJECT_NAME}
  CATKIN_DEPENDS roscpp moveit_ros_planning # ${catkin_LIBRARIES}
#  DEPENDS system_lib
)


include_directories(
  ${catkin_INCLUDE_DIRS}
)

add_executable(moveit_teleop
  src/moveit_teleop.cpp
)

add_dependencies(moveit_teleop
  ${catkin_EXPORTED_TARGETS}
)

target_link_libaries(moveit_teleop
  ${catkin_LIBRARIES}
)

And my package.xml:

<?xml version="1.0"?>
<package>
  <!-- snip -->    

  <buildtool_depend>catkin</buildtool_depend>
  <build_depend>moveit_rdf_loader</build_depend>
  <build_depend>moveit_ros_planning</build_depend>
  <build_depend>roscpp</build_depend>
  <build_depend>rospy</build_depend>
  <build_depend>ros_control</build_depend>
  <build_depend>ros_controllers</build_depend>
  <run_depend>moveit_rdf_loader</run_depend>
  <run_depend>moveit_ros_planning</run_depend>
  <run_depend>razer_hydra</run_depend>
  <run_depend>roscpp</run_depend>
  <run_depend>rospy</run_depend>
  <run_depend>ros_control</run_depend>
  <run_depend>ros_controllers</run_depend>

  <export>
  </export>
</package>
edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by boone
close date 2017-02-10 17:52:31.950730

1 Answer

Sort by ยป oldest newest most voted
4

answered 2016-12-16 21:15:05 -0600

ahendrix gravatar image

It looks like you have a typo in your CMakeLists.txt ; it's spelled target_link_libraries (note the extra r in libraries)

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2016-12-16 19:17:17 -0600

Seen: 3,257 times

Last updated: Dec 16 '16