FS#59883 - [protobuf] Add Cmake files
Attached to Project:
Arch Linux
Opened by greg (cheeseboy) - Thursday, 30 August 2018, 19:26 GMT
Last edited by Antonio Rojas (arojas) - Thursday, 07 July 2022, 14:06 GMT
Opened by greg (cheeseboy) - Thursday, 30 August 2018, 19:26 GMT
Last edited by Antonio Rojas (arojas) - Thursday, 07 July 2022, 14:06 GMT
|
Details
Current package doesn't install the cmake files for
protobuf.
File is here https://github.com/protocolbuffers/protobuf/blob/master/cmake/protobuf-config.cmake.in Cmake has https://cmake.org/cmake/help/v3.9/module/FindProtobuf.html but it needs protobuf-config.cmake to be installed for it to work |
This task depends upon
Closed by Antonio Rojas (arojas)
Thursday, 07 July 2022, 14:06 GMT
Reason for closing: Fixed
Additional comments about closing: protobuf 21.2 includes cmake files
Thursday, 07 July 2022, 14:06 GMT
Reason for closing: Fixed
Additional comments about closing: protobuf 21.2 includes cmake files
How should we install the cmake files? Currently we use the autotools build system to install protobuf...
Have you considered submitting an upstream bug report asking them to install the file when using autotools as well?
This doesn't make sense. Cmake uses *either* FindFoo.cmake files provided by cmake (or one of its extensions such as ECM) *or* FooConfig.cmake files provided by the packages themselves, but not both. And FWIW, find_package(Protobuf) works fine here with the cmake-provided module.
AFAIK one would need to adjust the protobuf PKGBUILD to also generate the protobuf-config.cmake from protobuf-config.cmake.in ?
[edit] I make a prototype PKGBUILD to build protobuf using CMake. Maybe this could serve as a template?
https://gist.github.com/jonathanschilling/b4aac25486b5bf47a4a1ff4daec94379
-- Found Protobuf: /usr/lib/libprotobuf.so (found version "3.21.1")
CMake Error at CMakeLists.txt:58 (find_package):
Could not find a package configuration file provided by "protobuf" with any
of the following names:
protobufConfig.cmake
protobuf-config.cmake
Add the installation prefix of "protobuf" to CMAKE_PREFIX_PATH or set
"protobuf_DIR" to a directory containing one of the above files. If
"protobuf" provides a separate development package or SDK, be sure it has
been installed.