From df2802145fa770fbd2e42dfcd141971f93300979 Mon Sep 17 00:00:00 2001 From: Rupert Nash Date: Wed, 13 Apr 2022 10:55:21 +0100 Subject: [PATCH] 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 Co-authored-by: Andras Lasso --- CMake/vtkMacroKitPythonWrap.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMake/vtkMacroKitPythonWrap.cmake b/CMake/vtkMacroKitPythonWrap.cmake index 4a783d7..d958ae6 100644 --- a/CMake/vtkMacroKitPythonWrap.cmake +++ b/CMake/vtkMacroKitPythonWrap.cmake @@ -160,8 +160,10 @@ macro(vtkMacroKitPythonWrap) if(VTK_WRAP_PYTHON AND BUILD_SHARED_LIBS) + if (${VTK_VERSION} VERSION_LESS "8.90") # Tell vtkWrapPython.cmake to set VTK_PYTHON_LIBRARIES for us. set(VTK_WRAP_PYTHON_FIND_LIBS 1) + endif() include(vtkWrapPython) set(TMP_WRAP_FILES ${MY_KIT_SRCS} ${MY_KIT_WRAP_HEADERS}) @@ -344,7 +346,6 @@ macro(vtkMacroKitPythonWrap) target_link_libraries(${MY_KIT_NAME}Python PRIVATE ${MY_KIT_NAME} - ${VTK_PYTHON_LIBRARIES} VTK::WrappingPythonCore VTK::Python )