Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Unknown CMake command "target_link_libaries"

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

This is in ROS indigo. 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>

Unknown CMake command "target_link_libaries"

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

This is in ROS indigo. 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>