ethz-ait / klt_feature_tracker

Track a number of features in a series of (stereo) images for machine vision applications
BSD 3-Clause "New" or "Revised" License
38 stars 50 forks source link

klt_feautre_trakcer catkin_package() error #6

Open YuanfuC opened 6 years ago

YuanfuC commented 6 years ago

When build snap_cam which depend the klt_feature_tracker the error occur:

-- ==> add_subdirectory(snap_cam)
-- Building snap_cam with catkin
-- Building klt_feature_tracker as a catkin package
-- Using these message generators: gencpp;genlisp;genpy
-- klt_feature_tracker: 0 messages, 1 services
CMake Error at /opt/ros/indigo/share/catkin/cmake/catkin_package.cmake:114 (message):
  catkin_package() 'catkin' must be listed as a buildtool dependency in the
  package.xml
Call Stack (most recent call first):
  /opt/ros/indigo/share/catkin/cmake/catkin_package.cmake:100 (_catkin_package)
  snap_cam/src/OpticalFlow/external/klt_feature_tracker/CMakeLists.txt:119 (catkin_package)

-- Configuring incomplete, errors occurred!
See also "/home/linaro/ros_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/linaro/ros_ws/build/CMakeFiles/CMakeError.log".
make: *** [cmake_check_build_system] Error 1

See the issue report at snap_cam .

YuanfuC commented 6 years ago

Add unset(_CATKIN_CURRENT_PACKAGE) into 'snap_cam/src/OpticalFlow/external/klt_feature_trackernal/CMakeLists.txt '

cmake_minimum_required(VERSION 2.8.3)
 project(klt_feature_tracker)
unset(_CATKIN_CURRENT_PACKAGE)
 # check if this is being built as a ROS package
 if (CATKIN_DEVEL_PREFIX)
     set(CATKIN_BUILD 1)

After add the line, the project can build successfully