FindProtobuf.cmake does not detect system-installed libprotobuf
On my Ubuntu system, I installed the libprotobuf-dev
package, which should install all required include headers and libraries:
dpkg -l
ii libprotobuf-dev:amd64 3.0.0-9.1ubuntu1 amd64 protocol buffers C++ library (development files)
dpkg -L libprotobuf-dev
[...]
/usr/include/google/protobuf/service.h
[...]
/usr/lib/x86_64-linux-gnu/libprotobuf.a
[...]
But the FindProtobuf.cmake I have does not find that library because it only executes this command:
# Find the include directory
find_path(Protobuf_INCLUDE_DIR
google/protobuf/service.h
PATHS ${Protobuf_SRC_ROOT_FOLDER}/src
)
It does not seem to check any system files, it even requires a src
folder, it seems ...
It is called with:
find_package(Protobuf 3.0.0 QUIET REQUIRED)