[CMake] include header files from external library

Andy Lego andy at legoandy.com
Fri Oct 3 14:12:27 EDT 2008


Hi Leila,

When doing the search for the header files, specify the relative path within
the tree and not the actual header file. For example,

find_path(OPEN_MESH_INCLUDES
NAMES OpenMesh/balh/balh/something.h
)

instead of

find_path(OPEN_MESH_INCLUDES
NAMES something.h)

Then OPEN_MESH_INCLUDES will contain the toplevel dir.

Andy

On Fri, Oct 3, 2008 at 11:03 AM, Leila Baghdadi
<baghdadi at phenogenomics.ca>wrote:

> Hi guys,
>
> I am wondering if someone can give me a quick hint here.
>
> I am trying to link an external library (openmesh.org) to itk so I can
> use their mesh subdivision algorithm on my meshes.
>
> I have downloaded and built openmesh successfully and I have tried to
> create the correct cmake files. however, I seem to be having difficulty
> with header files.
>
> The header files are all scattered in various directories within
> openmesh. I have managed to get cmake to locate the main header MeshIO.h
> However all the other include files in MeshIo.h are included with full
> directory structure i.e, include "OpenMesh/balh/balh/something.h"
>
> how do I tell cmake to place the root openmesh directory before the
> above.
>
> I hope I am not making this too complicated.
>
> thanks for your time
>
> Leila
>
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
>



-- 
Lets bike the world together
http://legoandy.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20081003/afc11050/attachment.htm>


More information about the CMake mailing list