• Michka Popoff's avatar
    ENH: Do not link against libpython when possible · 5668595e
    Michka Popoff authored
    This is similar to what is already done in ITK and SimpleITK.
    
    The new vtkTargetLinkLibrariesWithDynamicLookup.cmake file is slightly modified copy from
    ITK/CMake/itkTargetLinkLibrariesWithDynamicLookup.cmake
    The explanation of what this patch tries to achieve is documented in this file.
    
    A new argument is introduced, called OPTIONAL_PYTHON_LINK.
    When used, the module will be optionally be linked against libpython.
    In the module.cmake files, most vtkPython dependencies were moved to COMPILE_DEPENDS, so that libpython is not added to the target_link_libraries() call.
    
    The vtkPython is explicitely linked against the python libraries, as this is a python executable.
    
    Also, the find_package calls for the PythonLibs were made optional when possible.
    
    The XDMF3 project was not updated, this will need to be done separately if weak linking is wished for that project.
    
    Fixes: #16068
    5668595e
Name
Last commit
Last update
..
Testing/Python Loading commit data...
CMakeLists.txt Loading commit data...
module.cmake Loading commit data...
vtkPythonAlgorithm.cxx Loading commit data...
vtkPythonAlgorithm.h Loading commit data...