<font color='black' size='2' face='arial'>OK<font size="2">, then, the famous "answer your own question 10 minut<font size="2">es later" gambit:<br>
<br>
<font size="2">I <font size="2">re-thought it, and said to myself, "H<font size="2">ey, my teeny little tiny<font size="2"> test </font>program only re<font size="2">ally needs ITK</font></font></font></font>Common, so why am I not just asking for just that...?"<br>
</font></font><font color="black" face="arial" size="2">

<div><br>
<font size="2">I changed my find_package call to<font size="2">:<br>
<br>
</font></font>&nbsp; find_package(ITK 4.4 COMPONENTS ITKCommon REQUIRED)<br>
<br>
<font size="2">And now ITK_LIBRARIES only lists the ITKCommon lib and its depe<font size="2">ndents rather than everything under the su<font size="2">n<font size="2">. So it works now, with no link<font size="2">er <font size="2">error.</font></font><br>
<br>
<font size="2">G<font size="2">ood way to end the week, I think...<br>
<br>
<br>
<font size="2">(And, please, please, please, ... don't call me a "guru")</font><br>
<br>
<br>
<font size="2">:-)<br>
<font size="2">D<br>
<br>
</font></font></font></font></font></font></font></font>
</div>



<div> <br>

</div>



<div> <br>

</div>



<div style="font-family:arial,helvetica;font-size:10pt;color:black">-----Original Message-----<br>

From: Matt McCormick &lt;matt.mccormick@kitware.com&gt;<br>

To: Bill Lorensen &lt;bill.lorensen@gmail.com&gt;<br>

Cc: David Cole &lt;dlrdave@aol.com&gt;; insight-users &lt;insight-users@itk.org&gt;<br>

Sent: Fri, Feb 1, 2013 4:55 pm<br>

Subject: Re: [Insight-users] Simple client program question<br>

<br>









<div id="AOLMsgPart_0_905a5587-2a24-402b-8161-ffeaf0f78f1f" style="margin: 0px;font-family: Tahoma, Verdana, Arial, Sans-Serif;font-size: 12px;color: #000;background-color: #fff;">

<pre style="font-size: 9pt;"><tt>On Fri, Feb 1, 2013 at 9:54 PM, Bill Lorensen &lt;<a __removedlink__894081130__href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</a>&gt; wrote:
&gt; Dave,
&gt;
&gt; This has come up before. If you have built ITK with
&gt; Module_ITKVtkGlue:BOOL=ON, a client program needs to find VTK. If you
&gt; know a way to solve this problem, oh great cmake guru, we would all
&gt; appreciate it.

+1

&gt;
&gt; Bill
&gt;
&gt;
&gt; On Fri, Feb 1, 2013 at 4:39 PM, David Cole &lt;<a __removedlink__894081130__href="mailto:dlrdave@aol.com">dlrdave@aol.com</a>&gt; wrote:
&gt;&gt; Simple ITK client program CMakeLists.txt file:
&gt;&gt; ===========================================
&gt;&gt;   cmake_minimum_required(VERSION 2.8)
&gt;&gt;   project(itkClient)
&gt;&gt;
&gt;&gt;   find_package(ITK 4.4)
&gt;&gt;   include(${ITK_USE_FILE})
&gt;&gt;
&gt;&gt;   add_executable(itkClient itkClientMain.cxx)
&gt;&gt;   target_link_libraries(itkClient ${ITK_LIBRARIES})
&gt;&gt;
&gt;&gt; Question:
&gt;&gt; ===========================================
&gt;&gt; Should I have to mention VTK in this CMakeLists.txt file if I built ITK:
&gt;&gt;   with static libraries, -DBUILD_SHARED_LIBS:BOOL=OFF,
&gt;&gt;   and -DModule_ITKVtkGlue:BOOL=ON,
&gt;&gt;   and I am trying to link itkClient against the *install* tree of ITK?
&gt;&gt;
&gt;&gt; Or should it be optional/not-required, or automatically handled if it is
&gt;&gt; required?
&gt;&gt;
&gt;&gt; (right now, in 'master', it appears to be required, with CMake 2.8.10.2,
&gt;&gt; even if itkClient does not do any VTK stuff... I get the linker error pasted
&gt;&gt; below about "vtksys.lib"... ITK_LIBRARIES does not include "vtksys")
&gt;&gt;
&gt;&gt;
&gt;&gt; Thanks,
&gt;&gt; David
&gt;&gt;
&gt;&gt;
&gt;&gt; Linker error
&gt;&gt; ===========================================
&gt;&gt; 3: Run Build Command:ninja
&gt;&gt; 3: [1/2] Building CXX object CMakeFiles\itkClient.dir\itkClientMain.cxx.obj
&gt;&gt; 3: [2/2] Linking CXX executable itkClient.exe
&gt;&gt; 3: FAILED: cmd.exe /c cd . &amp;&amp; "C:\Program Files (x86)\CMake
&gt;&gt; 2.8\bin\cmake.exe" -E vs_link_exe C:\PROGRA~2\MICROS~1.0\VC\
&gt;&gt; bin\cl.exe  /nologo  /DWIN32 /D_WINDOWS /W3 /Zm1000 /GR /EHsc  /bigobj
&gt;&gt; /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1 /FeitkClient.exe
&gt;&gt;  /FditkClient.pdb @CMakeFiles/itkClient.rsp /link /implib:itkClient.lib
&gt;&gt; /version:0.0  /STACK:10000000 /machine:X86   /de
&gt;&gt; bug /INCREMENTAL /subsystem:console  &amp;&amp; cd .
&gt;&gt; 3: LINK : fatal error LNK1104: cannot open file 'vtksys.lib'
&gt;&gt;
&gt;&gt;
&gt;&gt; ITK_LIBRARIES
&gt;&gt; ===========================================
&gt;&gt; ITK_LIBRARIES='itksys;itkvnl_algo;itkvnl;itkv3p_netlib;ITKCommon;itkNetlibSlatec;ITKStatistics;ITKIOImageBase;ITKMesh;itkzlib;ITKMetaIO;ITKSpatialObjects;ITKPath;ITKLabelMap;ITKQuadEdgeMesh;ITKOptimizers;ITKPolynomials;ITKBiasCorrection;ITKBioCell;ITKDICOMParser;ITKEXPAT;ITKIOXML;ITKIOSpatialObjects;ITKFEM;itkopenjpeg;gdcmDICT;gdcmMSFF;ITKznz;ITKniftiio;ITKgiftiio;itkhdf5_cpp;itkhdf5;ITKIOBMP;ITKIOBioRad;ITKIOCSV;ITKIOGDCM;ITKIOIPL;ITKIOGE;ITKIOGIPL;ITKIOHDF5;itkjpeg;ITKIOJPEG;itktiff;ITKIOTIFF;ITKIOLSM;ITKIOMesh;ITKIOMeta;ITKIONIFTI;ITKNrrdIO;ITKIONRRD;itkpng;ITKIOPNG;ITKIOSiemens;ITKIOStimulate;ITKIOTransformBase;ITKIOTransformHDF5;ITKIOTransformInsightLegacy;ITKIOTransformMatlab;ITKIOVTK;ITKKLMRegionGrowing;ITKOptimizersv4;ITKVTK;ITKWatersheds;ITKReview;ITKVideoCore;ITKVideoIO;ITKVtkGlue'
&gt;&gt;
&gt;&gt;
&gt;&gt; _____________________________________
&gt;&gt; Powered by <a __removedlink__894081130__href="http://www.kitware.com" target="_blank">www.kitware.com</a>
&gt;&gt;
&gt;&gt; Visit other Kitware open-source projects at
&gt;&gt; <a __removedlink__894081130__href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a>
&gt;&gt;
&gt;&gt; Kitware offers ITK Training Courses, for more information visit:
&gt;&gt; <a __removedlink__894081130__href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a>
&gt;&gt;
&gt;&gt; Please keep messages on-topic and check the ITK FAQ at:
&gt;&gt; <a __removedlink__894081130__href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a>
&gt;&gt;
&gt;&gt; Follow this link to subscribe/unsubscribe:
&gt;&gt; <a __removedlink__894081130__href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a>
&gt;&gt;
&gt;
&gt;
&gt;
&gt; --
&gt; Unpaid intern in BillsBasement at noware dot com
&gt; _____________________________________
&gt; Powered by <a __removedlink__894081130__href="http://www.kitware.com" target="_blank">www.kitware.com</a>
&gt;
&gt; Visit other Kitware open-source projects at
&gt; <a __removedlink__894081130__href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a>
&gt;
&gt; Kitware offers ITK Training Courses, for more information visit:
&gt; <a __removedlink__894081130__href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a>
&gt;
&gt; Please keep messages on-topic and check the ITK FAQ at:
&gt; <a __removedlink__894081130__href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a>
&gt;
&gt; Follow this link to subscribe/unsubscribe:
&gt; <a __removedlink__894081130__href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a>
</tt></pre>
</div>

 <!-- end of AOLMsgPart_0_905a5587-2a24-402b-8161-ffeaf0f78f1f -->



</div>

</font></font>