Skip to content

Commit 1d40eb9

Browse files
rupertnashjcfrlassoan
committed
BUG: vtkMacroKitPythonWrap: Remove unnecessary link against VTK_PYTHON_LIBRARIES
Since the variable VTK_WRAP_PYTHON_FIND_LIBS was removed in Kitware/VTK@ed49fa01c (VTK v9.0.0) but is still used in VTK v8.2.0, this commit conditionally set it. Similarly it removes the link against VTK_PYTHON_LIBRARIES as any necessary link should be picked up via the INTERFACE_LINK property of VTK::Python. Co-authored-by: Jean-Christophe Fillion-Robin <[email protected]> Co-authored-by: Andras Lasso <[email protected]>
1 parent ae30832 commit 1d40eb9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

CMake/vtkMacroKitPythonWrap.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,10 @@ macro(vtkMacroKitPythonWrap)
143143

144144
if(VTK_WRAP_PYTHON AND BUILD_SHARED_LIBS)
145145

146+
if (${VTK_VERSION} VERSION_LESS "8.90")
146147
# Tell vtkWrapPython.cmake to set VTK_PYTHON_LIBRARIES for us.
147148
set(VTK_WRAP_PYTHON_FIND_LIBS 1)
149+
endif()
148150
include(vtkWrapPython)
149151

150152
set(TMP_WRAP_FILES ${MY_KIT_SRCS} ${MY_KIT_WRAP_HEADERS})
@@ -315,7 +317,6 @@ macro(vtkMacroKitPythonWrap)
315317
target_link_libraries(${MY_KIT_NAME}Python
316318
PRIVATE
317319
${MY_KIT_NAME}
318-
${VTK_PYTHON_LIBRARIES}
319320
VTK::WrappingPythonCore
320321
VTK::Python
321322
)

0 commit comments

Comments
 (0)