生成OpenCV 2.4.6时有关绝对和相对目标的CMake错误的Plethora [英] Plethora of CMake errors about absolute and relative destinations when generating OpenCV 2.4.6 (and a bit)

查看:267
本文介绍了生成OpenCV 2.4.6时有关绝对和相对目标的CMake错误的Plethora的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

2013年10月26日,我已经从 github 下载了最新的OpenCV源代码(cmake-gui 2.8.12)首先配置,然后生成项目。生成构建目录会引发许多错误,从生成过程中的错误开始,项目文件可能无效

Having downloaded the latest OpenCV source code from github on the 26th of October 2013 I have run CMake (cmake-gui 2.8.12) to first 'Configue' and then 'Generate' the projects. Generating the build directory throws a bunch of errors, starting with Error in generation process, project files may be invalid:

我认为是第一组我可以忽略它,它们看起来像这样:

The first group I think it is safe for me to ignore, they look like this:



apps / haartraining / CMakeLists中的CMake警告(dev)。 txt:

策略CMP0022未设置:
INTERFACE_LINK_LIBRARIES定义
链接接口。运行 cmake
--help-policy CMP0022以获取策略详细信息。使用cmake_policy
命令设置策略并禁止
此警告。

CMake Warning (dev) in apps/haartraining/CMakeLists.txt:
Policy CMP0022 is not set: INTERFACE_LINK_LIBRARIES defines the link interface. Run "cmake --help-policy CMP0022" for policy details. Use the cmake_policy command to set the policy and suppress this warning.

静态库目标
opencv_haartraining_engine具有

INTERFACE_LINK_LIBRARIES属性。

库应首选作为链接接口的源
。忽略属性和
,而是使用链接实现作为
链接接口。警告
是针对项目开发人员的。使用
-Wno-dev来抑制它。

Static library target "opencv_haartraining_engine" has a
INTERFACE_LINK_LIBRARIES property. This should be preferred as the source of the link interface for this library. Ignoring the property and using the link implementation as the link interface instead. This warning is for project developers. Use -Wno-dev to suppress it.

但是最后的错误列表让我更加担心。这些是什么?我应该对他们采取行动吗?我应该如何解决?

But the last list of errors has me more worried. What are these? Should I act on them? How should I fix them?


CMake错误:install(EXPORT OpenCVModules)给出了绝对目的地 / lib,但导出引用了具有相对目标 lib的目标 opencv_core的安装。

CMake Error: install(EXPORT "OpenCVModules") given absolute DESTINATION "/lib" but the export references an installation of target "opencv_core" which has relative DESTINATION "lib".

CMake错误:install(EXPORT OpenCVModules)给出了绝对目标 / lib,但导出引用具有相对目标 bin的目标 opencv_core的安装。

CMake Error: install(EXPORT "OpenCVModules") given absolute DESTINATION "/lib" but the export references an installation of target "opencv_core" which has relative DESTINATION "bin".

CMake错误:install(EXPORT OpenCVModules)给出了绝对目标 / lib,但导出了引用具有相对目标 lib的目标 opencv_flann的安装。

CMake Error: install(EXPORT "OpenCVModules") given absolute DESTINATION "/lib" but the export references an installation of target "opencv_flann" which has relative DESTINATION "lib".

CMake错误:给定绝对目标 / lib的情况下,install(EXPORT OpenCVModules)但是导出引用目标 opencv_flann的安装,该目标具有相对的目的地 bin。

CMake Error: install(EXPORT "OpenCVModules") given absolute DESTINATION "/lib" but the export references an installation of target "opencv_flann" which has relative DESTINATION "bin".

[...]

CMake错误:给定绝对目标 / lib时安装(导出 OpenCVModules),但端口引用具有相对目标 lib的目标 opencv_videostab的安装。

CMake Error: install(EXPORT "OpenCVModules") given absolute DESTINATION "/lib" but the export references an installation of target "opencv_videostab" which has relative DESTINATION "lib".

CMake错误:给定绝对目标 / lib时,install(EXPORT OpenCVModules)但是导出引用了目标 opencv_videostab的安装,该目标具有相对的目标 bin。

CMake Error: install(EXPORT "OpenCVModules") given absolute DESTINATION "/lib" but the export references an installation of target "opencv_videostab" which has relative DESTINATION "bin".

==========编辑= =========

========== EDIT ===========

我想知道这里的问题是否在于CMake值 CMAKE_USE_RELATIVE_PATHS 在最新版本的代码上运行CMake时,在版本2.4.6的代码上运行CMake时不存在该代码。如果是这样,解决办法是什么?

I wonder if the problem here is that the CMake value CMAKE_USE_RELATIVE_PATHS which is present when running CMake on the code for release 2.4.6 is not present when running CMake on the latest code. If so, what is the fix?

推荐答案

我使用了与您相同的情况宽度,即cmake 2.8.12,OpenCV 2.4.6。 ,我为指定该项目的生成器选择的是VS10(我使用VC10),并在其下选择了使用的默认本机编译器。但我终于成功了。

I used the same situation width you, cmake 2.8.12, OpenCV 2.4.6, what i chose for the "specify the generator for this project" was VS10(I used VC10), and chose "used default native compilers" under it. but I was success at last.

这篇关于生成OpenCV 2.4.6时有关绝对和相对目标的CMake错误的Plethora的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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