我不知道了很多關於cmake的,我試圖建立使用cmake和Qt的客戶端。獲取以下錯誤:「Qt5Widgets」的安裝前綴添加到CMAKE_PREFIX_PATH
CMake Error at alethzero/CMakeLists.txt:26 (find_package): By not providing "FindQt5Widgets.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"Qt5Widgets", but CMake did not find one.Could not find a package configuration file provided by "Qt5Widgets" with any of the following names:
Qt5WidgetsConfig.cmake qt5widgets-config.cmake
Add the installation prefix of "Qt5Widgets" to CMAKE_PREFIX_PATH or set "Qt5Widgets_DIR" to a directory containing one of the above files. If "Qt5Widgets" provides a separate development package or SDK, be sure it has been installed.
-- Configuring incomplete, errors occurred!
據我所知,我需要添加QT路徑到CMake。我該怎麼做?我已將Qt安裝在/ home/user/Programs中。我發現的所有解釋都是「只是做這個或那個」。我需要確切的終端命令,所以我可以在將來學會如何做。
謝謝!
UPDATE:export CMAKE_PREFIX_PATH=/home/user/Programs
沒有幫助我。
謝謝!我之前完成了這個工作,而且我仍然得到相同的結果。也許我應該從源代碼重新安裝QT。 (我用它們的.run包安裝它)。 – user3386675
對不起,我編輯帖子給出正確的答案。你不需要從源代碼編譯Qt。 – steveire
顯然這個正確的答案有兩個downvotes。這是爲什麼? – steveire