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 .--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake