[Insight-developers] CMake and external toolkits

Luis Ibanez ibanez@choroid.cs.unc.edu
Fri, 6 Apr 2001 12:25:28 -0400 (EDT)


On Fri, 6 Apr 2001, Bill Hoffman wrote:
> FIND_INCLUDE( FLTK_INCLUDE_DIR fltk.h H:/usr/local/fltk )
>
> First argument is the variable to be defined.
> Second argument is a .h file to look for.
> Third argument is an optional extra path to look for the file in.
> The standard PATH is searched by default.
>


Maybe this is not what I need, because here the .h file has to
be specified. I just want to put a generic path to a whole set
of .h files, like if it was an environment variable to add in
a Makefile after the -I option.

It is like if I wanted to build something using ITK and VTK,
... how to define: VTK_INCLUDE_DIR, without having to list
all the possible header in there ?


May I write something like:

FIND_INCLUDE( FLTK_INCLUDE_DIR   *.h   H:/usr/local/fltk )   ?

---

...another way to deal with it is just to add explicitly the
path to the command INCLUDE_DIRECTORIES, like:

INCLUDE_DIRECTORIES(
${ITK...
...
H:/usr/local/fltk
)


but, that has to be done in every CMakeFile that uses fltk...
it seems to be better to have the variable defined in only
on central place.



Luis