What is the correct way to add external library?
Hello,
recently a have problems using external library in ros nodes. I'm using GNU Scientific Library (GSL) in my ros node. So I have to find a way how to add gsl to build and link this node.
First, I found gsl package in ros packages, copied the files, add to ros path, and add depend to the my node manifest, but problem arise see this and this questions.
However, if I understand it correct, which is not necessarily the case, the only important thing of gsl package is that it exports this line in the manifest:
<cpp cflags="-I/usr/include/gsl" lflags="-lgsl -lgslcblas"/>
I can place this include a libraries directly into CMakeList.txt and get rid of gsl package completely see this, the question is if it this is a desired approach?
Finally, I decided to ask more general question as the title states: what is the correct way to include external library (for example gsl) in the ros package?
Thanks