【发布时间】:2021-12-01 04:43:50
【问题描述】:
我正在尝试使用 conan-ue4cli 工具让 gRPC 在 Unreal Engine 4 中运行。我使用此处提供的 grpc-ue4 配方链接:https://github.com/adamrehn/ue4-conan-recipes/tree/master/grpc-ue4
在运行ue4 conan build "grpc-ue4" 时抛出错误“找不到“Protobuf”提供的包配置文件”
输出:
...
-- Looking for pthread.h
-- Looking for pthread.h - not found
-- Found Threads: TRUE
-- Found c-ares: C:/Users/Redux Gamer/.conan/data/cares-ue4/1.16.1/adamrehn/4.27/package/7333dc905312a2df09e78e1a60d59e628a5f0321/lib/cmake/c-ares/c-ares-config.cmake (found suitable version "1.16.1", minimum required is "1.13.0")
CMake Error at cmake/protobuf.cmake:58 (find_package):
Could not find a package configuration file provided by "Protobuf" with any
of the following names:
ProtobufConfig.cmake
protobuf-config.cmake
Add the installation prefix of "Protobuf" to CMAKE_PREFIX_PATH or set
"Protobuf_DIR" to a directory containing one of the above files. If
"Protobuf" provides a separate development package or SDK, be sure it has
been installed.
Call Stack (most recent call first):
CMakeLists.txt:224 (include)
-- Configuring incomplete, errors occurred!
See also "C:/.conan/9d531a/1/CMakeFiles/CMakeOutput.log".
See also "C:/.conan/9d531a/1/CMakeFiles/CMakeError.log".
grpc-ue4/1.30.2@adamrehn/4.27:
grpc-ue4/1.30.2@adamrehn/4.27: ERROR: Package 'bf9f4e336e64d98ce96ba6aaac093ac1ff3705d4' build failed
grpc-ue4/1.30.2@adamrehn/4.27: WARN: Build folder C:\.conan\9d531a\1
ERROR: grpc-ue4/1.30.2@adamrehn/4.27: Error in build() method, line 98
cmake.configure(source_folder="grpc", args=self.cmake_flags())
ConanException: Error 1 while executing cd C:\.conan\9d531a\1 && ...
我正在运行 Windows 10、UE4.27、python 3.7.8、cmake 3.21.3。我尝试搜索丢失的 protobuf-config.cmake,但在柯南或项目文件夹中也找不到。
我们将不胜感激任何建议或指示。
负责的柯南文件在这里:https://github.com/adamrehn/ue4-conan-recipes/tree/master/grpc-ue4/1.30.2
【问题讨论】:
-
您没有指定如何尝试查找这些依赖项,请使用您的 conanfile.txt、conanfile.py 或其他任何内容进行更新。没有细节很难模仿你的错误。根据您的错误,我可以建议使用cmake_find_package_multi 生成器,因此柯南将为您生成
ProtobufConfig.cmake。
标签: cmake unreal-engine4 conan