Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Как правильно открыть проект с CMakeLists.txt?
-
Всем доброго времени суток.
Нашел интересующий меня проект - otter-browser
В Qt Creator открываю CMakeLists.txt и получаю:Running "C:\Program Files\CMake\bin\cmake.exe -E server "--pipe=\\.\pipe\{0cfee316-fc02-473e-b9d5-47a84d8b6457}" --experimental" in E:\build-otter-browser-Desktop_Qt_5_7_1_MSVC2015_32bit-Default. Starting to parse CMake project. The C compiler identification is MSVC 19.0.24215.1 The CXX compiler identification is MSVC 19.0.24215.1 Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/BIN/amd64_x86/cl.exe CMake Error: Generator: execution of make failed. Make command was: jom /nologo cmTC_d23f4\fast Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/BIN/amd64_x86/cl.exe -- broken CMake Error at C:/Program Files/CMake/share/cmake-3.14/Modules/CMakeTestCCompiler.cmake:60 (message): The C compiler "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/BIN/amd64_x86/cl.exe" is not able to compile a simple test program. It fails with the following output: Change Dir: E:/build-otter-browser-Desktop_Qt_5_7_1_MSVC2015_32bit-Default/CMakeFiles/CMakeTmp Run Build Command(s):jom /nologo cmTC_d23f4\fast The system cannot find the file specified Generator: execution of make failed. Make command was: jom /nologo cmTC_d23f4\fast CMake will not be able to correctly generate this project. Call Stack (most recent call first): CMakeLists.txt:11 (project) Configuring incomplete, errors occurred! See also "E:/build-otter-browser-Desktop_Qt_5_7_1_MSVC2015_32bit-Default/CMakeFiles/CMakeOutput.log". See also "E:/build-otter-browser-Desktop_Qt_5_7_1_MSVC2015_32bit-Default/CMakeFiles/CMakeError.log". CMake Project parsing failed. Running "C:\Program Files\CMake\bin\cmake.exe -E server "--pipe=\\.\pipe\{a94b5418-d718-4b9a-b46f-9617ad88bbeb}" --experimental" in E:\build-otter-browser-Desktop_Qt_5_7_1_MSVC2015_64bit-Default. Starting to parse CMake project. The C compiler identification is MSVC 19.0.24215.1 The CXX compiler identification is MSVC 19.0.24215.1 Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/BIN/x86_amd64/cl.exe CMake Error: Generator: execution of make failed. Make command was: jom /nologo cmTC_3a543\fast Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/BIN/x86_amd64/cl.exe -- broken CMake Error at C:/Program Files/CMake/share/cmake-3.14/Modules/CMakeTestCCompiler.cmake:60 (message): The C compiler "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/BIN/x86_amd64/cl.exe" is not able to compile a simple test program. It fails with the following output: Change Dir: E:/build-otter-browser-Desktop_Qt_5_7_1_MSVC2015_64bit-Default/CMakeFiles/CMakeTmp Run Build Command(s):jom /nologo cmTC_3a543\fast The system cannot find the file specified Generator: execution of make failed. Make command was: jom /nologo cmTC_3a543\fast CMake will not be able to correctly generate this project. Call Stack (most recent call first): CMakeLists.txt:11 (project) Configuring incomplete, errors occurred! See also "E:/build-otter-browser-Desktop_Qt_5_7_1_MSVC2015_64bit-Default/CMakeFiles/CMakeOutput.log". See also "E:/build-otter-browser-Desktop_Qt_5_7_1_MSVC2015_64bit-Default/CMakeFiles/CMakeError.log". CMake Project parsing failed. Starting to parse CMake project. The C compiler identification is MSVC 19.0.24215.1 The CXX compiler identification is MSVC 19.0.24215.1 Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/BIN/x86_amd64/cl.exe CMake Error: Generator: execution of make failed. Make command was: jom /nologo cmTC_7ce8c\fast Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/BIN/x86_amd64/cl.exe -- broken CMake Error at C:/Program Files/CMake/share/cmake-3.14/Modules/CMakeTestCCompiler.cmake:60 (message): The C compiler "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/BIN/x86_amd64/cl.exe" is not able to compile a simple test program. It fails with the following output: Change Dir: E:/build-otter-browser-Desktop_Qt_5_7_1_MSVC2015_64bit-Default/CMakeFiles/CMakeTmp Run Build Command(s):jom /nologo cmTC_7ce8c\fast The system cannot find the file specified Generator: execution of make failed. Make command was: jom /nologo cmTC_7ce8c\fast CMake will not be able to correctly generate this project. Call Stack (most recent call first): CMakeLists.txt:11 (project) Configuring incomplete, errors occurred! See also "E:/build-otter-browser-Desktop_Qt_5_7_1_MSVC2015_64bit-Default/CMakeFiles/CMakeOutput.log". See also "E:/build-otter-browser-Desktop_Qt_5_7_1_MSVC2015_64bit-Default/CMakeFiles/CMakeError.log". CMake Project parsing failed.
Подскажите, в чем проблема?
Может я не правильно открываю CMakeLists.txt?
-
Лучше сначала в консоли собрать, а потом проект импортировать
-
@Konstantin-Tokarev said in Как правильно открыть проект с CMakeLists.txt?:
Лучше сначала в консоли собрать, а потом проект импортировать
Пробовал. Не получается. Разработчики написали - "Открывай CMakeLists.txt в Qt Creator ".
Если не сложно, кто нибудь попробуйте его в консоли собрать.
Я пробовал на Win10Pro 64bit и Mac OS, не собираетсяНа всякий случай пробую еще раз.
E:\otter-browser\build>make --version GNU Make 3.82.90 Built for i686-pc-mingw32 Copyright (C) 1988-2012 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
Далее
E:\otter-browser\build>cmake ../ -- Building for: Visual Studio 16 2019 -- The C compiler identification is MSVC 19.20.27508.1 -- The CXX compiler identification is MSVC 19.20.27508.1 -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.20.27508/bin/Hostx64/x64/cl.exe -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.20.27508/bin/Hostx64/x64/cl.exe -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.20.27508/bin/Hostx64/x64/cl.exe -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.20.27508/bin/Hostx64/x64/cl.exe -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done CMake Error at CMakeLists.txt:83 (find_package): By not providing "FindQt5.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "Qt5", but CMake did not find one. Could not find a package configuration file provided by "Qt5" (requested version 5.6.0) with any of the following names: Qt5Config.cmake qt5-config.cmake Add the installation prefix of "Qt5" to CMAKE_PREFIX_PATH or set "Qt5_DIR" to a directory containing one of the above files. If "Qt5" provides a separate development package or SDK, be sure it has been installed. -- Configuring incomplete, errors occurred! See also "E:/otter-browser/build/CMakeFiles/CMakeOutput.log".
Все, приехали ...
-
Ну в консоли по крайней мере компилятор работает. А чтобы Qt обнаружить надо задать -DCMAKE_PREFIX_PATH=путь/к/Qt
-
@Konstantin-Tokarev said in Как правильно открыть проект с CMakeLists.txt?:
Ну в консоли по крайней мере компилятор работает. А чтобы Qt обнаружить надо задать -DCMAKE_PREFIX_PATH=путь/к/Qt
Да, я добавил в CMakeLists.txt
set (CMAKE_PREFIX_PATH "E:\\Qt\\5.7.1\\5.7\\msvc2015_64")
Посыпались другие ошибки.
-- Could NOT find HUNSPELL (missing: HUNSPELL_LIBRARIES HUNSPELL_INCLUDE_DIR) -- The following OPTIONAL packages have been found: * Qt5WinExtras (required version >= 5.6.0) -- The following REQUIRED packages have been found: * Qt5Core * Qt5Gui * Qt5Multimedia * Qt5Network * Qt5PrintSupport * Qt5Qml * Qt5Svg * Qt5Widgets * Qt5XmlPatterns * Qt5 (required version >= 5.6.0) -- The following OPTIONAL packages have not been found: * Qt5WebKitWidgets (required version >= 5.212.0), QtWebKit based backend (widgets), <https://www.qt.io/> * Hunspell (required version >= 1.5.0), Generic spell checking support, <https://hunspell.github.io/> CMake Error at CMakeLists.txt:600 (message): No web backends available! -- Configuring incomplete, errors occurred! See also "E:/otter-browser/build/CMakeFiles/CMakeOutput.log".
Иногда кажется что это какая-то уличная магия )))))
В частности не понятно где брать QtWebKit и Hunspell.На одном форуме прочел, что QtWebKit не сопровождается начиная с Qt5.6
Теперь ставлю Qt5.5.1 )))))Самое приколькое, что у меня есть Qt5WebKitWidgets.dll, но так как в проекте нет .pro, я немогу ее готовую прикрутить
-
http://download.qt.io/snapshots/ci/qtwebkit/5.212/latest/qtwebkit/
Не надо с 5.5.1 собирать
Откуда hunspell брать не знаю, но он optional, т.е. и без него соберется