How to find the Qt5 CMake module on Windows How to find the Qt5 CMake module on Windows windows windows

How to find the Qt5 CMake module on Windows


After the lines

cmake_minimum_required(VERSION 2.8.9)project(testproject)

add

set (CMAKE_PREFIX_PATH "C:\\Qt\\Qt5.0.1\\5.0.1\\msvc2010\\")

This solves the problem.


You should set the CMAKE_PREFIX_PATH environment variable instead or use the cmake-gui to set the path to the Qt 5 packages.


You need just add Qt path to Windows %PATH% variable. As suggested in official documentation: http://doc.qt.io/qt-4.8/install-win.html#step-3-set-the-environment-variables