<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">Now I call vtk from CMakeLists like this:</div><div class="gmail_default"><font face="verdana, sans-serif">FIND_PACKAGE(VTK 6.0 REQUIRED COMPONENTS vtkGUISupportQtOpenGL NO_MODULE)</font><br>

</div><div class="gmail_default"><font face="verdana, sans-serif"><br></font></div><div class="gmail_default" style><font face="verdana, sans-serif">but when compiling the project I still get</font><span style="font-family:verdana,sans-serif"> LNK1181 with vtkTestingGenericBridge.lib </span><span style="font-family:verdana,sans-serif">if I keep BUILD_TESTING set to off.</span></div>

<div class="gmail_default" style><font face="verdana, sans-serif"><br></font></div><div class="gmail_default" style><span style="font-family:verdana,sans-serif">Setting BUILD_TESTING to 1 solves the issue (regardless of the way how find_package is called). But I think it is stupid to require users to enable building of internal tests just so their normal applications can link properly.</span><font face="verdana, sans-serif"><br>

</font></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, May 23, 2013 at 4:51 PM, Marcus D. Hanwell <span dir="ltr">&lt;<a href="mailto:marcus.hanwell@kitware.com" target="_blank">marcus.hanwell@kitware.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The Qt QVTK kit was split into several modules, depending on what you<br>
want vtkGUISupportQt contains several of the standard classes,<br>
vtkGUISupportQtOpenGL a few more, and then vtkGUISupportQtSQL or<br>
vtkGUISupportQtWebkit may have what you want. It sounds like the<br>
testing issues are linked to building examples with testing disabled.<br>
If you enable the Qt group in the CMake GUI then you should get the<br>
appropriate modules in your VTK_LIBRARIES variable,<br>
<br>
<a href="http://vtk.org/Wiki/VTK/Build_System_Migration" target="_blank">http://vtk.org/Wiki/VTK/Build_System_Migration</a> contains more<br>
information on finding and linking to VTK modules in your application.<br>
I can add some notes there about Qt.<br>
<div class="HOEnZb"><div class="h5"><br>
On Thu, May 23, 2013 at 4:43 AM, Dženan Zukić &lt;<a href="mailto:dzenanz@gmail.com">dzenanz@gmail.com</a>&gt; wrote:<br>
&gt; When I remove QVTK from CMakeLists, the following 3 libraries cannot be<br>
&gt; found:<br>
&gt; vtkTestingGenericBridge.lib<br>
&gt; vtkTestingIOSQL.lib<br>
&gt; vtkTestingRendering.lib<br>
&gt;<br>
&gt; The rest of the VTK libraries are specified with full path, like this:<br>
&gt; D:\SDK\vtk-6.0.0\lib\Release\vtkalglib-6.0.lib<br>
&gt; D:\SDK\vtk-6.0.0\lib\Release\vtkChartsCore-6.0.lib<br>
&gt;<br>
&gt; If I remove those 3 offending libraries from dependency list, the program<br>
&gt; fully links and runs properly. And it does not matter whether it VTK was<br>
&gt; compiled as static or dynamic libraries.<br>
&gt;<br>
&gt; Also, if I enable BUILD_TESTING, then it works without additional<br>
&gt; modifications.<br>
&gt;<br>
&gt; Bottom line: some of the testing modules were needlessly referenced by other<br>
&gt; modules, and QVTK must no longer be specified in project&#39;s CMakeLists.<br>
&gt;<br>
&gt;<br>
&gt; On Wed, May 22, 2013 at 10:23 PM, Dženan Zukić &lt;<a href="mailto:dzenanz@gmail.com">dzenanz@gmail.com</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; I currently have this:<br>
&gt;&gt; TARGET_LINK_LIBRARIES(<br>
&gt;&gt; MyProject<br>
&gt;&gt;  ${VTK_LIBRARIES} QVTK)<br>
&gt;&gt;<br>
&gt;&gt; When I switched from naming all libs to ${VTK_LIBRARIES} approach, I<br>
&gt;&gt; remember I needed to add QVTK because it was not working otherwise. I am now<br>
&gt;&gt; at home, I will check tomorrow whether it works if I remove QVTK.<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; On Wed, May 22, 2013 at 9:28 PM, David Doria &lt;<a href="mailto:daviddoria@gmail.com">daviddoria@gmail.com</a>&gt; wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; On Wed, May 22, 2013 at 12:48 PM, Dženan Zukić &lt;<a href="mailto:dzenanz@gmail.com">dzenanz@gmail.com</a>&gt; wrote:<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; With VTK6 itself compiled, I tried switching my project to the new<br>
&gt;&gt;&gt;&gt; version.<br>
&gt;&gt;&gt;&gt; I first tried building with static settings. When I started getting<br>
&gt;&gt;&gt;&gt; error:<br>
&gt;&gt;&gt;&gt; LINK : fatal error LNK1181: cannot open input file &#39;QVTK.lib&#39;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; I looked around for solutions. This is what I found:<br>
&gt;&gt;&gt;&gt; <a href="http://www.vtk.org/Wiki/VTK/Tutorials/QtSetup" target="_blank">http://www.vtk.org/Wiki/VTK/Tutorials/QtSetup</a> (VTK_Group_Qt and<br>
&gt;&gt;&gt;&gt; BUILD_SHARED_LIBS)<br>
&gt;&gt;&gt;&gt; but even after following this, the error remains.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Does anyone have suggestions about what to do?<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Do you have a<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; target_link_libraries(YourProject [something] QVTK)<br>
&gt;&gt;&gt; ?<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; If so, you can replace it with simply<br>
&gt;&gt;&gt; target_link_libraries(YourProject ${VTK_LIBRARIES})<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; and QVTK will work (assuming you are still doing what you mentioned about<br>
&gt;&gt;&gt; turning on VTK_Group_Qt, etc.)<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; David<br>
&gt;&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
</div></div><div class="HOEnZb"><div class="h5">&gt; _______________________________________________<br>
&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;<br>
&gt; Visit other Kitware open-source projects at<br>
&gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;<br>
&gt; Please keep messages on-topic and check the VTK FAQ at:<br>
&gt; <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
&gt;<br>
&gt; Follow this link to subscribe/unsubscribe:<br>
&gt; <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
&gt;<br>
</div></div></blockquote></div><br></div>