Ask Your Question

How to modify dependency list when building a package from source?

asked 2017-04-12 00:01:39 -0500

sam26 gravatar image

updated 2017-04-18 00:20:23 -0500

I am using Ubuntu 16.04 ARM and have installed ros-desktop onto my system. However, I am looking to point the rviz package to our own GL implementation instead of mesa. To do so, I am following the instructions to build rviz from source. But I am clueless about where and how to modify the dependency list to incorporate the new GL library. Can someone please help me figure out how to go about it. Thanks in advance.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2017-04-12 02:31:03 -0500

updated 2017-04-13 03:27:23 -0500

I guess you should be looking at the files CMakeLists.txt and package.xml of the rviz package


If what you want is to substitute OpenGL for your own awesome implementation of GL (lets call it myAwesomeGL) I would do the following:

  • Create (if you don't already have it) a FindMyAwesomeGL.cmake file and install it so that cmake can find it.
  • In the file package.xml substitute:




  • In the file CMakeLists.txt substitute:


find_package(OpenGL REQUIRED)

for this

find_package(MyAwesomeGL REQUIRED)

and int all CMakeLists.txt in all subsequent directories substitute all occurrences of



edit flag offensive delete link more


but where in CMakelists.txt would I change the path of openGL library ? Do I have to explicitly set the library path?

sam26 gravatar image sam26  ( 2017-04-12 06:03:00 -0500 )edit

Thanks for the detailed response but I don't quite get what you mean by creating a cmake file. I already have the library files (.so) of myawesomeGL besides mesa .So wouldn't setting the env variable OPENGL_LIBRARY in CMakelists.txt to find the path to myawesomeGL instead of mesa be sufficient?

sam26 gravatar image sam26  ( 2017-04-13 04:47:26 -0500 )edit

If not the above, something in similar lines? where I don't have to build myawesomeGL from scratch but make use of my already existing .so files to fool rviz.

sam26 gravatar image sam26  ( 2017-04-13 04:49:34 -0500 )edit

I think you misunderstood what I meant, you don't need to rebuild myawesomeGL just "tell" cmake how to find it by creating the appropriate FindMyAwesomeGL.cmake file. Regarding your suggestions, well... God kills a few kittens when one does things like that, but it should work ;)

Martin Peris gravatar image Martin Peris  ( 2017-04-13 19:23:06 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2017-04-12 00:01:39 -0500

Seen: 104 times

Last updated: Apr 18 '17