[Paraview] add_executable cannot create imported target "vtkWrapPython"
Mathieu Malaterre
mathieu.malaterre at gmail.com
Wed Sep 7 09:29:10 EDT 2011
Hi all,
I am trying to build a paraview module. I have VTK 5.8.0 and
ParaView 3.10.1 installed on a linux/debian machine. When importing
both VTK & ParaView cmake module, I am getting the following errors
(truncated):
...
CMake Error at /tmp/pv/usr/lib/paraview/CMake/ParaViewTargets.cmake:16
(ADD_EXECUTABLE):
add_executable cannot create imported target "vtkWrapPython" because
another target with the same name already exists.
Call Stack (most recent call first):
/tmp/pv/usr/lib/paraview/ParaViewConfig.cmake:58 (INCLUDE)
CMakeLists.txt:3 (find_package)
CMake Error at /tmp/pv/usr/lib/paraview/CMake/ParaViewTargets.cmake:19
(ADD_EXECUTABLE):
add_executable cannot create imported target "vtkWrapPythonInit" because
another target with the same name already exists.
Call Stack (most recent call first):
/tmp/pv/usr/lib/paraview/ParaViewConfig.cmake:58 (INCLUDE)
CMakeLists.txt:3 (find_package)
...
It can easily be reproduced with:
$ cat /tmp/bla/CMakeLists.txt
project(bla)
find_package(VTK REQUIRED)
find_package(ParaView REQUIRED)
Could someone please confirm this is an actual issue ? If so I'll
report that to paraview bug tracker. Meanwhile could someone please
suggest a fix, other than -tediously- adding blockers for each
imported target, eg:
$ cat /usr/lib/paraview/CMake/ParaViewTargets.cmake
...
# Create imported target vtkWrapPython
IF(NOT TARGET vtkWrapPython)
ADD_EXECUTABLE(vtkWrapPython IMPORTED)
ENDIF(NOT TARGET vtkWrapPython)
...
This issue can also be seen when building VTKEdge (svn checkout from 20110819).
Thanks much !
--
Mathieu
More information about the ParaView
mailing list