Hi Pat, <br><br>Within ITK,  you could do the following [1]:<br><br>  MyProject<br>     |----- LibA   (depends on ITKFoo and ITKBar)<br>     |------LibB  (depends on ITKFoo)<br><br>Considering your project has two libraries and that these library have different requirement regarding the ITK module they need, you could do:<br>

<br>In MyProject/LibA/CMakeLists.txt<br><br>   find_package(ITK COMPONENTS ITKFoo ITKBar)<br><br><br>In MyProject/LibB/CMakeLists.txt<br><br>   find_package(ITK COMPONENTS ITKFoo)<br><br>I believe the same should be possible within VTK modular.<br>

<br>What I wonder is where the name of components are described / listed.<br><br>Hth<br>Jc<br><br>[1] <a href="http://wiki.slicer.org/slicerWiki/index.php/Documentation/Snapshot/Developers/Overlinking_Underlinking#Reply_from_Brad_King">http://wiki.slicer.org/slicerWiki/index.php/Documentation/Snapshot/Developers/Overlinking_Underlinking#Reply_from_Brad_King</a><br>

[2] <a href="http://www.cmake.org/cmake/help/cmake-2-8-docs.html#command:find_package">http://www.cmake.org/cmake/help/cmake-2-8-docs.html#command:find_package</a><br><br><div class="gmail_quote">On Fri, Mar 30, 2012 at 7:40 PM, Pat Marion <span dir="ltr"><<a href="mailto:pat.marion@kitware.com">pat.marion@kitware.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I could be wrong, but I thought that using VTK_LIBRARIES would cause your project to link to all vtk libraries, when you may only want to link with specific ones, like vtkFiltering (or vtkFiltersCore for modularized.)<br>

<br>

Also, is there is a cmake flag that can determine whether or not the vtk in use if modularized or not?  Perhaps just looking at the VTK version number?<span class="HOEnZb"><font color="#888888"><br><br>Pat</font></span><div class="HOEnZb">

<div class="h5"><br><br><div class="gmail_quote">On Fri, Mar 30, 2012 at 7:28 PM, Bill Lorensen <span dir="ltr"><<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@gmail.com</a>></span> wrote:<br>



<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I think if you use VTK_LIBRARIES in your target_link_libraries<br>
everything should be OK. With ITK modular, applications use<br>
ITK_LIBRARIES without problems for both ITKv3 and ITKv4.<br>
<div><div><br>
On Fri, Mar 30, 2012 at 4:19 PM, Pat Marion <<a href="mailto:pat.marion@kitware.com" target="_blank">pat.marion@kitware.com</a>> wrote:<br>
> Hi,<br>
><br>
> It seems fairly straightforward to have a project support vtk 5 and vtk 6,<br>
> but what about cmake code that can support both vtk and vtk modular?  Any<br>
> examples of what that might look like?<br>
><br>
> The reason I ask is... PCL uses VTK on the desktop, but what if I want to<br>
> use VTK+VES  for PCL on mobile.  Then the PCL cmake system should know how<br>
> to use vtk modular, since VES uses vtk modular.<br>
><br>
> Pat<br>
><br>
</div></div>> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.vtk.org/mailman/listinfo/vtk-developers" target="_blank">http://www.vtk.org/mailman/listinfo/vtk-developers</a><br>
><br>
><br>
<span><font color="#888888"><br>
<br>
<br>
--<br>
Unpaid intern in BillsBasement at noware dot com<br>
</font></span></blockquote></div><br>
</div></div><br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtk-developers" target="_blank">http://www.vtk.org/mailman/listinfo/vtk-developers</a><br>
<br>
<br></blockquote></div><br><br clear="all"><br>-- <br>+1 919 869 8849<br><br>