FindQt

自版本 3.14 起已棄用:只有在策略 CMP0084 未設定為 NEW 時,此模組才可用。

搜尋所有已安裝的 Qt3 或 Qt4 版本。

此模組無法處理 Qt5 或任何更高版本。對於這些版本,請參閱 cmake-qt(7)

如果您的專案可以使用多個版本的 Qt,才應該使用此模組。如果不是,您應該直接使用 FindQt4 或 FindQt3。如果在機器上找到多個版本的 Qt,則使用者必須將選項 DESIRED_QT_VERSION 設定為他們想要使用的版本。如果機器上只找到一個版本的 Qt,則 DESIRED_QT_VERSION 會設定為該版本,並包含對應的 FindQt3 或 FindQt4 模組。一旦使用者設定了 DESIRED_QT_VERSION,就會包含 FindQt3 或 FindQt4 模組。

QT_REQUIRED if this is set to TRUE then if CMake can
            not find Qt4 or Qt3 an error is raised
            and a message is sent to the user.
DESIRED_QT_VERSION OPTION is created
QT4_INSTALLED is set to TRUE if qt4 is found.
QT3_INSTALLED is set to TRUE if qt3 is found.