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

How to add include path in rosmake?

asked 2012-10-06 02:26:17 -0500

sam gravatar image

For example:

I installed libvtk-5.8.

And I try to include vtkAppendPolyData.h not vtk-5.8/vtkAppendPolyData.h.

So I want to add an include path to rosmake or ubuntu system.

How to do that?

Thank you~

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2012-10-06 10:29:26 -0500

ipso gravatar image

If by 'add include path to rosmake' you mean you want to add a path to your compiler's include path, just add an include_directories statement to your CMakeLists.txt file:

...
rosbuild_init()
...
include_directories(/path/to/vtk-5.8)
...
rosbuild_add_executable(your_app src/your_app.cpp)
...
target_link_libraries(your_app somelib otherlib)
...

Note though that in general, using absolute paths is not recommended. It seems there is a FindVTK.cmake, so `find_package(VTK ..) would be better.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-10-06 02:26:17 -0500

Seen: 1,387 times

Last updated: Oct 06 '12