[CMake] No Member Found when use cmake construct protocol-buffers
Yu Jing
yu at argcv.com
Sun Apr 19 19:14:55 EDT 2015
It is really sorry and I sent a html mail and it shows too ugly...
I have converted it to plain text and wish someone may give some suggestion.
------------------ Original ------------------
From: "Yu Jing"<yu at argcv.com>;
Date: Sun, Apr 19, 2015 06:53 PM
To: "cmake"<cmake at cmake.org>;
Subject: No Member Found when use cmake construct protocol-buffers
I wish to use proto and managed by cmake. While some error found and it seems
A sample project can be shown here(https://github.com/yuikns/cmake-proto)
The files are as follow
.
├── app1
│ ├── app1.cpp
│ └── app1.proto
├── CMakeLists.txt
├── common
│ ├── bar
│ │ ├── bar.proto
│ │ └── CMakeLists.txt
│ └── foo
│ ├── CMakeLists.txt
│ └── foo.proto
└── README.md
In common/bar/bar.proto, it defined as follow :
import "common/foo/foo.proto";
message bar_msg
{
optional foo_msg foo = 1;
optional string name = 2;
}
and I can use command :
$ protoc --cpp_out=build common/bar/bar.proto
$ protoc --cpp_out=build common/foo/foo.proto
in root directory.
while , I adjust several times and still can not make it work in cmake.
Here is the question in stackoverflow http://stackoverflow.com/questions/29720410/no-member-found-when-use-cmake-construct-proto/29727925 , and someone said there may something wrong of PROTOBUF_GENERATE_CPP.
May I know how can I adjust the project? Any help are appreciated .
More information about the CMake
mailing list