FindQt¶
自 3.14 版本起已棄用:此模組僅在 policy 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.