c++ - CMake find_path include directory prefix -
i writing minimal find*.cmake openni. find header files wrote
find_path(openni_include_path xnos.h) which working expected (openni_include_path has value /usr/include/ni). however, in files have include headers with
#include <ni/xnos.h> how can rid of ni prefix, can write
#include <xnos.h> the problem first include xncppwrapper.h gets included , file includes again xn*.h headers, without ni prefix. results in compiler error.
always have path use find_path match 1 in #include statements.
if want #include <ni/xnos.h> should write
find_path(openni_include_path ni/xnos.h) if instead want #include <xnos.h>, use
find_path(openni_include_path xnos.h) just sure make mind beforehand 1 want use , stick it. mixing several include paths same library sure way unnecessarily overcomplicate build environment.
Comments
Post a Comment