If(PROTOBUF_GENERATE_CPP_APPEND_PATH) # This variable is common for all types of output. Message(SEND_ERROR "Error: PROTOBUF_GENERATE_GRPC_CPP() called without any proto files") ![]() I followed the main guide located on libtin's github.io page (located here ) and another guide from StackOverflow (located here ) that uses Visual Studio, but I am using CMake so those. ![]() Out of curiosity does it build if you remove the -clean-first argument (not that it will address the clean issue) Cory Kramer at 14:10 No, it can't work with generated files. I am trying to compile a project using Visual Studio Code on Windows that uses the libtins library but I am having trouble getting CMake to link the library. find_program(GRPC_CPP_PLUGIN grpc_cpp_plugin) # Get full path to pluginįunction(PROTOBUF_GENERATE_GRPC_CPP SRCS HDRS) CMake binpathcmake -versioncmake GRPC git GRPC gRPC >git clone -b v1.29. 540 2 19 It looks like it is actually the clean command that is failing. But again, this works only when gRPC is installed. Normally Id just solve this by having a CMakeLists.txt in the project root, having the proto folder and the cpp folder side by side and each have their own CMakeLists.txt and then the project root adds them in using addsubdirectory and linking the targets together. 'For me the Path with /./././ doesn't make any sense' - This is how install prefix ( PACKAGEPREFIXDIR) is compute. Code below is based on PROTOBUF_GENERATE_CPP implementation. 'I found that I had to build gRPC itself with all the dependencies' - Moreover, you need to install gRPC (but possibly into the custom install prefix). But you can implement your own function-wrapper for needed plugin. Module findProtobuf.cmake defines functions-wrappers only for common protoc calls: PROTOBUF_GENERATE_CPP - for -cpp_out and PROTOBUF_GENERATE_PYTHON - for -py_out.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |