On Tue, Jun 26, 2012 at 1:36 PM, Xiaoxiao Liu <[email protected]>wrote:

> Some of my thoughts:
>
> 1). I agreed that we haven't take full advantage of modular VTK in ITK yet.
>      VtkGlue module itself should only depends on several VTK modules
> instead of entire VTK_LIBRAIRES.
>
> 2) When building ITK, ITK_LIBRAIRES should  include all depending
> libraries turned on by enabled modules.
>    Users then should be able do
> *               Find( ITK     Required     ITKCommon  ITKVtkGlue) *
>    in their itk application code without specifying "Find(VTK .....)" in
> their own code, unless their code depends on
>    some other vtk modules  which are not specified in VtkGlue's dependency
> list.
>

The main problem I see is the following case:

I have ProjectA that only relies on ITK (without ITKVtkGlue). It has built
for years with ITK built without ITKVtkGlue and using only:

FIND_PACKAGE(ITK REQUIRED)
INCLUDE(${USE_ITK_FILE})

Then I have another project, ProjectB, that does need ITKVtkGlue. For this
project, I have to compile ITK with ITKVtkGlue, and then additionally use:

FIND_PACKAGE(VTK REQUIRED)
INCLUDE(${USE_VTK_FILE})

This is fine for ProjectB (though potentially confusing), but now ProjectA
doesn't build against ITK anymore! And I have to go add:

FIND_PACKAGE(VTK REQUIRED)
INCLUDE(${USE_VTK_FILE})

to ProjectA's CMakeLists.txt even though it doesn't require VTK at all
(even via ITK)! The big problem comes when someone pulls my repository of
ProjectA and they actually don't have VTK on their system at all. Why
should they have to modify the CMakeLists.txt file just because they don't
have a library that isn't required?

David
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://kitware.com/products/protraining.php

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.itk.org/mailman/listinfo/insight-developers

Reply via email to