Cleanup qt5
Cleans up the information in vtk${vtk-module}.cmake files for external modules (namely Qt5).
This change generates the following:
if(NOT Qt5_DIR)
set(Qt5_DIR "/home/utkarsh/Software/qt/5.7.0/install/lib/cmake/Qt5")
endif()
find_package(Qt5 REQUIRED QUIET COMPONENTS Widgets)
Instead of
if(NOT Qt5Widgets_DIR)
set(Qt5Widgets_DIR "/home/utkarsh/Software/qt/5.7.0/install/lib/cmake/Qt5Widgets")
endif()
find_package(Qt5Widgets REQUIRED QUIET)
The big advantage with new form is for an application that depends on VTK and imports a QT-based VTK module, can simply do find_package(Qt5 COMPONENTS Sql)
(for example) and it will find the required module in Qt5 used by VTK. Otherwise CMake complains it cannot find Qt5_DIR
if Qt5 is not installed in standard location.