<div class="gmail_quote">On Tue, Jun 26, 2012 at 1:36 PM, Xiaoxiao Liu <span dir="ltr"><<a href="mailto:xiaoxiao.liu@kitware.com" target="_blank">xiaoxiao.liu@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>Some of my thoughts:</div><div><br></div><div>1). I agreed that we haven't take full advantage of modular VTK in ITK yet.</div><div> VtkGlue module itself should only depends on several VTK modules instead of entire VTK_LIBRAIRES.</div>
<div><br></div><div>2) When building ITK, ITK_LIBRAIRES should include all depending libraries turned on by enabled modules.</div><div> Users then should be able do </div><div><div><i> Find( ITK Required ITKCommon ITKVtkGlue) </i></div>
<div> in their itk application code without specifying "Find(VTK .....)" in their own code, unless their code depends on</div><div> some other vtk modules which are not specified in VtkGlue's dependency list.</div>
</div></blockquote><div><br></div><div>The main problem I see is the following case:</div><div><br></div><div>I have ProjectA that only relies on ITK (without ITKVtkGlue). It has built for years with ITK built without ITKVtkGlue and using only:</div>
<div><br></div><div><div>FIND_PACKAGE(ITK REQUIRED)</div><div>INCLUDE(${USE_ITK_FILE})</div></div><div><br></div><div>Then I have another project, ProjectB, that does need ITKVtkGlue. For this project, I have to compile ITK with ITKVtkGlue, and then additionally use:</div>
<div><br></div><div>FIND_PACKAGE(VTK REQUIRED)</div><div>INCLUDE(${USE_VTK_FILE})</div><div><br></div><div>This is fine for ProjectB (though potentially confusing), but now ProjectA doesn't build against ITK anymore! And I have to go add:</div>
<div class="gmail_quote"><br></div><div>FIND_PACKAGE(VTK REQUIRED)</div><div>INCLUDE(${USE_VTK_FILE})</div><div><br></div><div>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?</div>
<div><br></div>David<br></div>