Skip to content

Easier cmake qt5 windows

Bill Hoffman requested to merge bill-hoffman/vtk:easier-cmake-qt5-windows into master

To avoid having to set CMAKE_PREFIX_PATH or set each individual cmake _DIR variable for Qt5 components, this commit changes all the find_package calls for Qt5 to be the COMPONENT form:

 # old
 find_package(Qt5Widgets REQUIRED QUIET)

 # new
 find_package(Qt5 COMPONENTS Widgets REQUIRED QUIET)

For example, after this change, the user need only specify Qt5_DIR like this: Qt5_DIR:PATH=C:/Qt5/5.4/msvc2010_opengl/lib/cmake/Qt5. Instead of specifying: Qt5Core_DIR Qt5Designer_DIR, Qt5Gui_DIR, etc.

Merge request reports

Loading