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

Revision history [back]

Hi, I get this problem, And fix it. Please attention this point WORD: CMAKE_PREFIX_PATH

now run:

sudo vi  /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake

line 67:

set(paths " ")
foreach(path ${CMAKE_PREFIX_PATH})
  if(IS_DIRECTORY ${path}/share/${component}/cmake)
    list(APPEND paths ${path}/share/${component}/cmake)
  endif()
endforeach()

Please add one line:

 set(paths " ")
 message("Fix The fucking bug: ${CMAKE_PREFIX_PATH}")
 foreach(path ${CMAKE_PREFIX_PATH})
  if(IS_DIRECTORY ${path}/share/${component}/cmake)
    list(APPEND paths ${path}/share/${component}/cmake)
  endif()
endforeach()

You will find the ${CMAKE_PREFIX_PATH} is empty or don't has the /opt/ros/kinetic

So, PLEASE ADD ONE LINE IN YOUR PROJECT CMakeLists.txt

set(CMAKE_PREFIX_PATH "${CMAKE_PREFIX_PATH};/opt/ros/kinetic")