[CMake] No Member Found when use cmake construct protocol-buffers
Yu Jing
yu at argcv.com
Sun Apr 19 06:53:37 EDT 2015
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 .
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20150419/4038500f/attachment-0001.html>
More information about the CMake
mailing list