kylelutz/compute — pull request #201 by f-koehler (2014-07-29 11:47:04+00:00)
Title: explicitly look for Qt4 and not for Qt in general

I had a problem building the Qt examples, so I looked into the CMakeLists.

I use CMake 3.0.0 and have both Qt4 and Qt5 installed. QT_USE_FILE is defined by the FindQt4.cmake module that comes shipped with CMake. In versions older than 3.0.0 the FindQt.cmake module uses FindQt4.cmake to find Qt. In newer versions CMake will look for Qt5 so that QT_USE_FILE is not defined. By directly looking for Qt4 by calling find_package(Qt REQUIRED COMPONENTS QtCore QtGui QtOpenGL) everything works fine, even when using CMake 2.8.8.