Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • VTK VTK
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 740
    • Issues 740
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 198
    • Merge requests 198
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • VTK
  • VTKVTK
  • Merge requests
  • !1511

ENH: Do not link against libpython when possible

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Michka Popoff requested to merge iMichka/vtk:vtkNoPythonLink into master May 19, 2016
  • Overview 36
  • Commits 1
  • Changes 20

This is similar to what is already done in ITK and SimpleITK.

The new vtkTargetLinkLibrariesWithDynamicLookup.cmake file is slightly modified copy from ITK (things have been renamed from ITK to VTK). 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.

This fixes the following bug: http://www.vtk.org/Bug/view.php?id=16068

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: vtkNoPythonLink