CMakeList question on overrides
I want to point to a local directory for Sophus which has se3.h instead of se3.hpp. The path I am specifying does have the correct header.
I set the find_package as follows.
findpackage(Sophus REQUIRED NOSYSTEMENVIRONMENTPATHNOCMAKEPATH NOCMAKESYSTEMPATH NODEFAULTPATH REQUIRED PATHS /home/rjn/catkinws/rpg/Sophus)
as you can see I have tried just about every thing allowed to stop cmake from using the system lib. But I still get the error:
In file included from /home/rjn/catkinws/src/rpgros/rpgvikit/vikitcommon/src/mathutils.cpp:8:0: /home/rjn/catkinws/src/rpgros/rpgvikit/vikitcommon/include/vikit/mathutils.h:14:24: fatal error: sophus/se3.h: No such file or directory compilation terminated.
The only thing that seems to work is if I hard code the paths in both, this seem like a hack
INCLUDEDIRECTORIES and TARGETLINKLIBRARIES(${PROJECTNAME}
Asked by rnunziata on 2017-10-10 23:07:12 UTC
Comments
it looks like what some people (including me) are having/had with OpenCV (for which the same hack also works). I wonder what happen if you clear your workspace ( erase the build an devel directories ) then rebuild it ( without the hack in your cmakefile ). I'd be glad if you can do the test ;)
Asked by TTDM on 2017-10-12 07:27:49 UTC