正在尝试使用cmake进行编译
Attempting to compile with cmake
我正试图编译一个在Cmake和Qt中具有依赖关系的程序(在Mountain Lion上)。代码
cmake build
返回
CMake Error at /Applications/CMake 2.8-12.app/Contents/share/cmake-2.8/Modules/FindQt4.cmake:1386 (message):
Found unsuitable Qt version "" from NOTFOUND, this code requires Qt 4.x
Call Stack (most recent call first):
CMakeLists.txt:195 (FIND_PACKAGE)
-- Configuring incomplete, errors occurred!
当前的Qt版本是5.1.1,我已经在~/bin/中安装了它,我不知道如何让Cmake找到它。
错误是说this code requires Qt 4.x
,那么你在徘徊什么?这是由于行FIND_PACKAGE(Qt4 REQUIRED),尽管Cmake版本应该支持Qt5,但可能是您的CmakeList不适合为此编写。请按照本文档更正您的CmakeList。
相关文章:
- 如何使用CMake编译.proto文件来生成.grpcp.pb.cc和.grpc.pb.h文件
- MinGw 无法从 cmake 编译测试文件
- C++CMake编译指令与
- 在windows上使用cmake编译FFTW(OpenMP)
- 无法让 CMAKE 编译项目
- 包含 cmath 标头时出现 cmake 编译错误
- 使用用 C++ 和 DDS 编写的 CMAKE 编译代码
- 使用 cmake 编译带有 v8 库的 C++ 程序
- 在 Windows 上使用 Emscripten 和 CMake 编译 GLFM 的问题
- 如何使用 CMAKE 编译现代 C++ 项目代码
- 使用 Cmake 编译 LZO 时,它注意到找不到任何 VS 实例
- 使用 CMake 编译时,更改头文件的位置会导致缺少 vtable 错误
- 使用LibConfig库的CMAKE编译问题
- 使用 cmake 编译时未定义的引用
- 分段错误,当使用 cmake 编译而不使用 cout 编译时
- 在CLion中使用CMake编译带有参数的C++会引发错误,而在终端中编译则不会
- 如何让 CMake 编译包含 Boost Local Functions 的源文件
- 无法使用CMake编译简单的Opencv C++文件
- 预处理之后和使用CMake编译之前的自定义构建步骤
- 使用 CMake 编译 SFML 应用程序