目的:使用CMake获得OpenCV x86版
安装网上许多大神的步骤做了,但是……开头就错……
例如如下大神:https://blog.csdn.net/zhangping1987/article/details/78051233、https://blog.csdn.net/k87974/article/details/76732222、https://blog.csdn.net/whu_zs/article/details/78842135、https://blog.csdn.net/xzzppp/article/details/54926117等等
截图:
》》版本:OpenCV3.3.0+CMake3.11.3+VS2015
》》注意:仅仅使用CMake构建极其简单的程序似乎都会出错,不知道哪个环节出问题……
以下为
Configure后的提示:
CMake Deprecation Warning at CMakeLists.txt:81 (cmake_policy):
The OLD behavior for policy CMP0020 will be removed from a future version
of CMake.
The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.
CMake Deprecation Warning at CMakeLists.txt:85 (cmake_policy):
The OLD behavior for policy CMP0022 will be removed from a future version
of CMake.
The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.
CMake Deprecation Warning at CMakeLists.txt:94 (cmake_policy):
The OLD behavior for policy CMP0026 will be removed from a future version
of CMake.
The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.
CMake Deprecation Warning at CMakeLists.txt:102 (cmake_policy):
The OLD behavior for policy CMP0046 will be removed from a future version
of CMake.
The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.
CMake Error at CMakeLists.txt:127 (project):
Failed to run MSBuild command:
C:/Program Files (x86)/MSBuild/14.0/bin/MSBuild.exe
to get the value of VCTargetsPath:
Microsoft (R) 生成引擎版本 14.0.25420.1
版权所有(C) Microsoft Corporation。保留所有权利。
生成启动时间为 2018/6/26 17:38:36。
项目中不存在 BeforeTargets 特性中的“C:\Program Files (x86)\MSBuild\14.0\Microsoft.Common.targets\ImportAfter\Xamarin.Common.targets (34,37)”位置列出的目标“_ConvertPdbFiles”,将忽略该目标。
项目中不存在 AfterTargets 特性中的“C:\Program Files (x86)\MSBuild\14.0\Microsoft.Common.targets\ImportAfter\Xamarin.Common.targets (34,70)”位置列出的目标“_CollectPdbFiles”,将忽略该目标。
项目中不存在 BeforeTargets 特性中的“C:\Program Files (x86)\MSBuild\14.0\Microsoft.Common.targets\ImportAfter\Xamarin.Common.targets (41,38)”位置列出的目标“_CollectMdbFiles”,将忽略该目标。
项目中不存在 AfterTargets 特性中的“C:\Program Files (x86)\MSBuild\14.0\Microsoft.Common.targets\ImportAfter\Xamarin.Common.targets (41,71)”位置列出的目标“_CopyMdbFiles”,将忽略该目标。
节点 1 上的项目“D:\opencv330\build\CMakeFiles\3.11.3\VCTargetsPath.vcxproj”(默认目标)。
InitializeBuildStatus:
正在创建“x64\Debug\VCTargetsPath.tlog\unsuccessfulbuild”,因为已指定“AlwaysCreate”。
FinalizeBuildStatus:
正在删除文件“x64\Debug\VCTargetsPath.tlog\unsuccessfulbuild”。
正在对“x64\Debug\VCTargetsPath.tlog\VCTargetsPath.lastbuildstate”执行 Touch 任务。
已完成生成项目“D:\opencv330\build\CMakeFiles\3.11.3\VCTargetsPath.vcxproj”(默认目标)的操作。
已成功生成。
0 个警告
0 个错误
已用时间 00:00:00.27
Configuring incomplete, errors occurred!
See also "D:/opencv330/build/CMakeFiles/CMakeOutput.log".