Skip to content

Commit b36d294

Browse files
committed
BUG: remove unnecessary link against VTK_PYTHON_LIBRARIES
For VTK 9 and later, in vtkMacroKitPythonWrap, remove the link against VTK_PYTHON_LIBRARIES as any necessary link should be picked up via the INTERFACE_LINK property of VTK::Python. Similarly for the addition of Python to the global include_indirectories.
1 parent 8b5c4b2 commit b36d294

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

CMake/vtkMacroKitPythonWrap.cmake

Lines changed: 5 additions & 5 deletions
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-
# Tell vtkWrapPython.cmake to set VTK_PYTHON_LIBRARIES for us.
147-
set(VTK_WRAP_PYTHON_FIND_LIBS 1)
146+
if (${VTK_VERSION} VERSION_LESS "8.90")
147+
# Tell vtkWrapPython.cmake to set VTK_PYTHON_LIBRARIES for us.
148+
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})
@@ -228,9 +230,8 @@ macro(vtkMacroKitPythonWrap)
228230

229231
VTK_WRAP_PYTHON3(${MY_KIT_NAME}Python KitPython_SRCS "${TMP_WRAP_FILES}")
230232

231-
include_directories("${PYTHON_INCLUDE_PATH}")
232-
233233
if(${VTK_VERSION} VERSION_LESS "8.90")
234+
include_directories("${PYTHON_INCLUDE_PATH}")
234235

235236
# Create a python module that can be loaded dynamically. It links to
236237
# the shared library containing the wrappers for this kit.
@@ -317,7 +318,6 @@ macro(vtkMacroKitPythonWrap)
317318
target_link_libraries(${MY_KIT_NAME}Python
318319
PRIVATE
319320
${MY_KIT_NAME}
320-
${VTK_PYTHON_LIBRARIES}
321321
VTK::WrappingPythonCore
322322
VTK::Python
323323
)

0 commit comments

Comments
 (0)