c++ - cmake错误:文件安装找不到“作者”:没有错误
问题描述
我正在尝试使用最新的 CMake GUI 和 Visual Studio 2019 构建此存储库: https ://github.com/cginternals/openll
在构建和链接所有依赖项后,我在 CMake 中没有任何错误,在 VS2019 中构建解决方案也没有任何问题,但是,在构建安装目标时,我收到以下错误:
Severity Code Description Project File Line Suppression State
Error MSB3073 The command "setlocal
"C:\Program Files\CMake\bin\cmake.exe" -DBUILD_TYPE=Release -P cmake_install.cmake
if %errorlevel% neq 0 goto :cmEnd
:cmEnd
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
:cmErrorLevel
exit /b %1
:cmDone
if %errorlevel% neq 0 goto :VCEnd
:VCEnd" exited with code 1. INSTALL C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets 149
和以下输出:
4>CMake Error at cmake_install.cmake:44 (file):
4> file INSTALL cannot find
4> "C:/Users/Johannes/source/repos/CGInternals/openll/ll-opengl/AUTHORS": No
4> error.
4>
4>
4>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(149,5): error MSB3073: The command "setlocal
4>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(149,5): error MSB3073: "C:\Program Files\CMake\bin\cmake.exe" -DBUILD_TYPE=Release -P cmake_install.cmake
4>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(149,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd
4>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(149,5): error MSB3073: :cmEnd
4>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(149,5): error MSB3073: endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
4>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(149,5): error MSB3073: :cmErrorLevel
4>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(149,5): error MSB3073: exit /b %1
4>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(149,5): error MSB3073: :cmDone
4>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(149,5): error MSB3073: if %errorlevel% neq 0 goto :VCEnd
4>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(149,5): error MSB3073: :VCEnd" exited with code 1.
4>Done building project "INSTALL.vcxproj" -- FAILED.
========== Rebuild All: 3 succeeded, 1 failed, 0 skipped ==========
在我的构建文件夹中,文件的引用部分cmake_install.cmake
如下所示(这些是第 35 到 57 行):
if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xruntimex" OR NOT CMAKE_INSTALL_COMPONENT)
file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/." TYPE FILE FILES "C:/Users/user/source/repos/CGInternals/openll/ll-opengl/build/VERSION")
endif()
if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xdevx" OR NOT CMAKE_INSTALL_COMPONENT)
file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/." TYPE FILE FILES "C:/Users/user/source/repos/CGInternals/openll/ll-opengl/openll-config.cmake")
endif()
if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xruntimex" OR NOT CMAKE_INSTALL_COMPONENT)
file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/." TYPE FILE FILES "C:/Users/user/source/repos/CGInternals/openll/ll-opengl/AUTHORS")
endif()
if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xruntimex" OR NOT CMAKE_INSTALL_COMPONENT)
file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/." TYPE FILE FILES "C:/Users/user/source/repos/CGInternals/openll/ll-opengl/LICENSE")
endif()
if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xruntimex" OR NOT CMAKE_INSTALL_COMPONENT)
file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/." TYPE FILE FILES "C:/Users/user/source/repos/CGInternals/openll/ll-opengl/README.md")
endif()
if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xruntimex" OR NOT CMAKE_INSTALL_COMPONENT)
file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/." TYPE DIRECTORY FILES "C:/Users/user/source/repos/CGInternals/openll/ll-opengl/data")
endif()
这是什么意思?在源代码和构建文件夹中都没有名为“AUTHORS”的文件。我怎样才能摆脱这个错误?
解决方案
推荐阅读
- python - 整数变量不使用 python 存储在平面缓冲区中
- angular - Angular 8 库在接收数据后加载功能模块
- facebook - 为什么我的组在搜索结果中包含另一个国家/地区子域?
- oracle - ORACLE 中的日期映射或翻译
- firebase - 云功能:在没有数据库/VPC 的情况下跨实例存储简单的共享值?
- python - 如何附加项目之间最大差异的列表
- angular - 如何在像 span 这样的文本元素中使用 [color] 指令?
- c++ - RapidJSON - 使用通配符遍历具有不同成员名称的复杂 JSON 结构
- c# - 日期时间问题
- c++ - 程序在一台计算机上运行,但在另一台计算机上不起作用