I have a project with a structure like:
Project_Root:
- CMakeLists.txt
- src
* src_file.cpp
* CMakeLists.txt
- proto
* proto_file.proto
* CMakeLists.txt
I am having problems compiling the proto files.
Error: PROTOBUF_GENERATE_CPP() called without any proto files
The CMakeLists.txtx file in the "proto" folder has a structure like:
find_package( Protobuf REQUIRED )
include_directories(${PROTOBUF_INCLUDE_DIR})
include_directories( ${CMAKE_CURRENT_BINARY_DIR} )
protobuf_generate_cpp(
PROTO_SRCS
PROTO_HDRS
proto_file.proto )
add_library( proto_lib}
${PROTO_SRCS}
${PROTO_HDRS} )
target_link_libraries( proto_lib }
${EXTRA_LIBS}
)
Any ideas?
Thanks in advance.