Skip to content

Simplify CMakeLists.txt files

Andrew Maclean requested to merge Simplify-CMake into master

Removing checks for old versions of VTK in the CMakeLists.txt files.

For example:

Removing lines like

  • set(VERSION_MIN "6.0.0")
  • Requires_Version()
  • if (VTK_VERSION VERSION_LESS "8.90.0")
      include(${VTK_USE_FILE})
    endif()

Replacing:

  if (NOT VTK_VERSION VERSION_LESS "8.90.0")
    vtk_module_autoinit(
      TARGETS ${WIKI}${EXAMPLE}
      MODULES ${VTK_LIBRARIES}
      )
  endif()

With:

  vtk_module_autoinit(
    TARGETS ${WIKI}${EXAMPLE}
    MODULES ${VTK_LIBRARIES}
    )

Also updating module names such as vtkCommonColor with CommonColor in find_package(VTK COMPONENTS...

Edited by Andrew Maclean

Merge request reports

Loading