Right, ParaView's Use file (ParaViewUse.cmake) already calls find VTK seeding it with PARAVIEW_VTK_DIR. Hence the duplicate targets.<div><br></div><div><br><div class="gmail_quote">On Wed, Sep 7, 2011 at 9:36 AM, Utkarsh Ayachit <span dir="ltr"><<a href="mailto:utkarsh.ayachit@kitware.com">utkarsh.ayachit@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Mathieu,<br>
<br>
I'm not surprised that it doesnt' work. You cannot bring in VTK and<br>
ParaView in the same project. If you project depends on both, you<br>
should just include ParaView and you'll get access to most of VTK as<br>
well (I can't think of anything we disable explicitly when importing<br>
VTK, but I may be wrong).<br>
<font color="#888888"><br>
Utkarsh<br>
</font><div><div></div><div class="h5"><br>
On Wed, Sep 7, 2011 at 9:29 AM, Mathieu Malaterre<br>
<<a href="mailto:mathieu.malaterre@gmail.com">mathieu.malaterre@gmail.com</a>> wrote:<br>
> Hi all,<br>
><br>
> I am trying to build a paraview module. I have VTK 5.8.0 and<br>
> ParaView 3.10.1 installed on a linux/debian machine. When importing<br>
> both VTK & ParaView cmake module, I am getting the following errors<br>
> (truncated):<br>
><br>
> ...<br>
> CMake Error at /tmp/pv/usr/lib/paraview/CMake/ParaViewTargets.cmake:16<br>
> (ADD_EXECUTABLE):<br>
> add_executable cannot create imported target "vtkWrapPython" because<br>
> another target with the same name already exists.<br>
> Call Stack (most recent call first):<br>
> /tmp/pv/usr/lib/paraview/ParaViewConfig.cmake:58 (INCLUDE)<br>
> CMakeLists.txt:3 (find_package)<br>
><br>
><br>
> CMake Error at /tmp/pv/usr/lib/paraview/CMake/ParaViewTargets.cmake:19<br>
> (ADD_EXECUTABLE):<br>
> add_executable cannot create imported target "vtkWrapPythonInit" because<br>
> another target with the same name already exists.<br>
> Call Stack (most recent call first):<br>
> /tmp/pv/usr/lib/paraview/ParaViewConfig.cmake:58 (INCLUDE)<br>
> CMakeLists.txt:3 (find_package)<br>
> ...<br>
><br>
><br>
> It can easily be reproduced with:<br>
><br>
> $ cat /tmp/bla/CMakeLists.txt<br>
> project(bla)<br>
> find_package(VTK REQUIRED)<br>
> find_package(ParaView REQUIRED)<br>
><br>
> Could someone please confirm this is an actual issue ? If so I'll<br>
> report that to paraview bug tracker. Meanwhile could someone please<br>
> suggest a fix, other than -tediously- adding blockers for each<br>
> imported target, eg:<br>
><br>
> $ cat /usr/lib/paraview/CMake/ParaViewTargets.cmake<br>
> ...<br>
> # Create imported target vtkWrapPython<br>
> IF(NOT TARGET vtkWrapPython)<br>
> ADD_EXECUTABLE(vtkWrapPython IMPORTED)<br>
> ENDIF(NOT TARGET vtkWrapPython)<br>
> ...<br>
><br>
> This issue can also be seen when building VTKEdge (svn checkout from 20110819).<br>
><br>
> Thanks much !<br>
> --<br>
> Mathieu<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>
> Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
><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>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
</div></div></blockquote></div><br></div>