[Insight-users] Grouping all libraries and executables in a single directory

Luis Ibanez luis.ibanez@kitware.com
Tue, 17 Sep 2002 13:09:59 -0400


Hi,

Currently the toolkit builts all its libraries
and executables in the subdirectories where the
code is.

For example:

   Insight/Code/Common/libITKCommon.a
   Insight/Code/BasicFilters/libITKBasicFilters.a
   Insight/Code/Algorithms/libITKAlgorithms.a

...  etc.


Applications using ITK have to put all these
subdirectories on the search path for libraries.

In order to make ITK easier to use from other
packages the configuration is being reorganized
so that all the libraries are built in a common
directory and all the executables are built in
a common directory.

These two directories are specified at CMake
configuration time by using the variables

     EXECUTABLE_OUTPUT_PATH
     LIBRARY_OUTPUT_PATH

By default they will be configured as

    EXECUTABLE_OUTPUT_PATH = ${ITK_BINARY_DIR}/bin
    LIBRARY_OUTPUT_PATH    = ${ITK_BINARY_DIR}/lib

but you can change it from ccmake (on Unix)
or CMakeSetup (on Windows) to any location
of your preference.


---

The changes required for this reorganization
of the binaries will be checked in the CVS
repository soon.

A confirmation notice will be sent shortly
before and shortly after the changes are
commited.

---

The side effect of this change is that you
may end up having duplicate copies of the
libraries and executable. This can be a
significant amount of disk space (about 2 Gb
if you are building all the code: examples,
testing and Tcl wrapping).


In order to prevent this duplication from
happening the  following procedure is
recommended:

0) wait until the confirmation notice is
    sent saying that the changes are being
    committed.

1) go to your binary directory and copy the
    current CMakeCache.txt file to another
    directory *outside* of the current binary
    tree.

2) delete the content of the current binary tree

3) copy the CMakeCache.txt file back to the
    binary directory.

4) update the source directory from CVS.

5) reconfigure using CMake

6) rebuild the toolkit.



Applications using the toolkit will also have
to be reconfigured. This time with the advantage
that all the libraries will be located in a single
directory.


Please let us know if you have any questions.


Thanks


   Luis