[Insight-developers] CMake and external toolkits

Luis Ibanez ibanez@choroid.cs.unc.edu
Fri, 6 Apr 2001 10:54:29 -0400 (EDT)


Hi,

I'm having trouble with settin variables in a CMakeList.txt file.
Here is the case:


A small image viewer was added to the Unsupported directory
under the name FltkImageViewer. This viewer is a class intended
to be used in itk programs, in the following way:

  typedef fltk::ImageViewer< ImageType > ViewerType;
  ViewerType::Pointer   viewer = ViewerType::New();
  viewer->SetImage( theImageIwantToView );
  viewer->Show();

It requires an external toolkit "FLTK" for GUI.
This is open source and can be downloaded from http://www.fltk.org.
It runs on Windows95/NT, Linux, SunOS, IRIX and other systems.

The CMakeList file indicates where the user has installed FLTK,
for that, the variables FTLK_INCLUDE_DIR and FLTK_LIBRARY_DIR
have been added.

However I'm having trouble getting them into the VC++ project
generated after running CMakeSetup.

What I'm doing is to run CMakeSetup, and when the notepad
pops up with the CMakeCache.txt file, I add :

FLTK_INCLUDE_DIR:FILEPATH=H:/usr/local/fltk
FLTK_LIBRARY_DIR:FILEPATH=H:/usr/local/fltk/lib

save the file and close it.

After that, the VC++ project for FltkImageViewer contains
in |Project|->|Settings|->|C/C++|->|Preprocesor| include
directories the explicit string: ${FLTK_INCLUDE_DIR}
instead of the expanded content of the string.

What the right way to define the variables in order
to get the expanded string ?



Luis