我尝试按照本指南构建 OsmAnd 原生渲染库:为 OsmAndMapCreator 编译原生渲染库。
但是,当我执行 amd64-windows-vc12.cmd 时,我在指南的步骤 #3 中收到错误。这就是完整的消息:
Project "D:\Documents\02 Projekte\OsmAnd ORM\DevEnvironment\core-legacy\targets\amd64-windows-vc12.baked\CMakeFiles\3.29.3\VCTargetsPath.vcxproj" on node 1 (default targets).
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(839,5): error : The BaseOutputPath/OutputPath property is not set for project 'VCTargetsPath.vcxproj'. Please check to make sure that you have specified a valid combination of Configuration and Platform for this project. Configuration='Debug' Platform='x64'. You may be seeing this message because you are trying to build a project without a solution file, and have specified a non-default Configuration or Platform that doesn't exist for this project. [D:\Documents\02 Projekte\OsmAnd ORM\DevEnvironment\core-legacy\targets\amd64-windows-vc12.baked\CMakeFiles\3.29.3\VCTargetsPath.vcxproj]
由于
vctargetspath.vcxproj
是在构建过程中自动创建的,因此实际问题必须提前某个步骤定位。
我不明白为什么构建配置不适合。难道是我系统设置的问题?
确实是评论中提到的Visual Studio版本问题;
-G "Visual Studio 17 2022" -A x64
返回:
CMake Error at CMakeLists.txt:2 (project):
Generator Visual Studio 17 2022
could not find any instance of Visual Studio.
可以通过此处的提示解决:CMake:Visual Studio 15 2017 找不到 Visual Studio 的任何实例。