adding pcl library with qmake


I am trying to add pcl into a QT project with qmake. I found a lot of posts with the same problem, but no solution that helps me.

I am working on a mac and installed pcl with homebrew. So all my libraries are found under "usr/local/Cellar/"

I tried to add some libraries with pkg configuration

CONFIG += link_pkgconfig
PKGCONFIG += eigen3

I also tried it with different packages.

After that I added the Libraries manually:

LIBS += -L/usr/local/Cellar/pcl/1.8.0_2/lib
INCLUDEPATH += /usr/local/Cellar/pcl/1.8.0_2/include/pcl-1.8/pcl

The Library got added. But when I wanted to include he is searching for pcl/PCLHeader.h which is included as PCLHeader.h.

Is there a way to add all the libraries to pcl/ ? The same problems come with every library I tried to add.

And is there no way to simply use the flags: PCL_INCLUDE_DIRS

I don't have qmake. You seem to be in the right direction in your usage of LIBS and INCLUDEPATH.

Try removing the /path from the end of the INCLUDEPATH. That will let qmake/compiler see the pcl/PCLHeader.h file.

By : blackpen

This video can help you solving your question :)
By: admin