[backport] [cmake] Use the protobuf supplied cmake file instead of the cmake supplied one
Summary
This is a backport of https://reviews.bitcoinabc.org/D14254
The cmake one needs to be updated for each version of protobuf that impacts the file generation or dependencies, which can cause discrepeancies. It actually happens on ArchLinux where the latest cmake (3.26) is unable to properly use the latest protobuf (23.4).
This diff uses the protobuf config file instead and its API, which despite being a bit less convenient to use will remain supported and works as well with the cmake supplied package file, so we can keep using it as a backup.
Test plan
ninja all check-bitcoin-qt
- Run all the cross compilation builds and the gitian builds as well.
- Check it fixes the Qt build on ArchLinux.
fixes #502 (closed)
Edited by Axel Gembe