microsoft / azurelinux

Linux OS for Azure 1P services and edge appliances
MIT License
4.3k stars 546 forks source link

Include CMake package files with GRPC and protobuf devel RPMs #3488

Open rjjkm opened 2 years ago

rjjkm commented 2 years ago

The GRPC and protobuf devel RPMs include only pkg-config files. Is there a specific reason why the CMake package files are not included?

Building GRPC and protobuf applications with CMake is greatly simplified by using the protobuf_generate function included in protobuf-config.cmake.

Not sure what the overall strategy is, I see CMake package files included when installing other libraries. Seems if a library generates CMake package files they should be included with the RPM.

Thank you

oliviacrain commented 1 year ago

Thanks for your patience here. We definitely want to package these CMake files if it greatly simplifies development for you.

This was fixed for grpc in #5719- thanks @reubeno! grpc-devel >= 1.42.0-6 will contain this fix, once released.

Self-assigning to apply a similar change to protobuf.

oliviacrain commented 1 year ago

Did a little bit of digging, this is a bit harder than I previously thought due to the version of protobuf we ship.

The main sticking points:

So, not much we can do here other than manually configuring and installing the relevant CMake files. I'm not comfortable doing so due to unfamiliarity with CMake, so I'll unassign myself from this bug. Happy to take a PR fixing this. Otherwise, this change will happen in 3.0 when we'll switch to the CMake-based build.

rjjkm commented 1 year ago

I can wait for the 3.0 release. Thanks for investigating.