[Insight-developers] Re: CmakeLists.txt changes

Luis Ibanez luis.ibanez@kitware.com
Wed, 03 Apr 2002 08:35:45 -0500


Bill,

This new configuration still need some polishing.

Here is the sequence I assumed the user will follow:

1) Decide if he wants to use VTK at all:

if yes, set USE_VTK to "ON", otherwise leave it
with the default value "OFF" in which case all
the directories requiring VTK will be quietly
ignored and will not be build.

2) Once USE_VTK is "ON", the second question is
if you want to use an installed VTK (the one that
you download as binaries) or a built VTK (the one
that you produce by downloading the sources and
compiling everithing in your platform).

The user indicate his preference by setting:

   USE_INSTALLED_VTK
   USE_BUILT_VTK

They are a redundant in the sense that if one
if "ON" the other is expected to be "OFF".


3) According to this selection:

if USE_INSTALLED_VTK="ON", the user now has to
provide the paths to the binary installation using
VTK_INSTALL_PATH.

if USE_BINARY_VTK="ON", the user has to to provide
the paths for the place where the binary has been
sent. This is done in the VTK_BINARY_PATH.


4) Only when the paths (binary or installed) have been
found, CMake will set the internal variable : "HAS_VTK".
Code requiring VTK has to test for this variable to be "ON".

--

In the previous setting, the code requiring VTK was
testing for "USE_VTK_FILE". I thought I replaced all
of them by tests for "HAS_VTK" but maybe I miss one
of them.  I'm double checking on this.




    Luis


=======================================================

Lorensen, William E (CRD) wrote:
> Luis,
> When I run cmake on unix I get the following error:
> 
> no change to vcl_config_headers.h
> cmake: creating : /home/lorensen2/Insight-solaris/Makefile
> CMake Error: INCLUDE: Error : 
> INCLUDE Include file not found: ${USE_VTK_FILE}
> /home/lorensen/Insight/Testing/Code/IO
> cmake: creating : /home/lorensen2/Insight-solaris/Utilities/Makefile
> cmake: creating : /home/lorensen2/Insight-solaris/Utilities/zlib/Makefile
> 
> 
> I have not set the new USE_VTK boolean in my cache. I do have a USE_BUILT_VTK bool set to 1.
> 
> Seems like a flw in the new logic.
> 
> Bill
> 
>