CMake路径中出错 [英] Error in CMake path

查看:763
本文介绍了CMake路径中出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图为kinect演示事件构建Visual Studio项目, rgbddemo 。根据页面上的说明,我需要设置PATH变量以包括来自QT的QMAKE。我这样做,但我不断收到这个错误:



CMakeLists.txt中的CMake错误:1(QT4_WRAP_CPP):
未知的CMake命令QT4_WRAP_CPP / p>

从我可以从谷歌收集,这是一个问题,CMake知道来自QT的东西。我上面链接的页面还提到你可以设置QMAKE在CMake的路径,但我不知道如何这样做。有人有任何建议吗?感谢。

解决方案

您可以尝试插入行

  FIND_PACKAGE(Qt4)

加入顶层CMakeLists.txt文件

  INCLUDE($ {nestk_BINARY_DIR} /UseNestk.cmake)

这应该导致它试图为你找到 qmake 。我不知道为什么他们没有这样,但后来我不熟悉cmake。


I'm trying to build the Visual Studio project for a kinect demo thing, rgbddemo. According to the instructions on the page, I need to set the PATH variable to include QMAKE from QT. I did that, but I keep getting this error:

CMake Error at CMakeLists.txt:1 (QT4_WRAP_CPP): Unknown CMake command "QT4_WRAP_CPP".

From what I could gather from google, it's a problem with CMake knowing where something from QT is. The page I linked above also mentions that you can set the path for QMAKE within CMake, but I don't know how to do that. Does anyone have any suggestions? Thanks.

解决方案

You could try inserting the line

FIND_PACKAGE(Qt4)

into the top-level CMakeLists.txt file after the line

INCLUDE("${nestk_BINARY_DIR}/UseNestk.cmake")

That should cause it to try to find qmake for you. I'm not sure why they don't have that though, but then I'm not that familiar with cmake.

这篇关于CMake路径中出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆