Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CMake packaging files #578

Closed
Klaim opened this issue Jul 9, 2015 · 2 comments
Closed

Add CMake packaging files #578

Klaim opened this issue Jul 9, 2015 · 2 comments

Comments

@Klaim
Copy link

Klaim commented Jul 9, 2015

This is an issue specific to 3.x version of Protobuf.

As pointed in this FindProtobuf CMake module issue: http://public.kitware.com/Bug/view.php?id=14833

If Protobuf upstream now builds with CMake they should distribute packaging files as documented here:
http://www.cmake.org/cmake/help/v3.3/manual/cmake-packages.7.html

As explained in the issue description and the comments following, the issue is that the library don't have a way to express it's binaries locations once built using CMake. With the previous visual studio files on windows, the paths are fixed so the issue here was to complete the FindProtobuf module to work with 64bit versions.

Now that Protobuf provides CMake files, the paths do not match any FindProtobuf module way of searching anymore. The current best way to fix this is to provide packaging files instead of assuming the user have a working FindProtobuf module. This way, the packaging files will guide CMake and the user code can use either path variables generated on build OR (better solution) directly imported targets generated. Imported targets are easier to work with for the user.

This would also make FindProtobuf module in CMake repository obsolete for Protobuf 3.x+ and would make Protobuf more independant.

@xfxyjwf
Copy link
Contributor

xfxyjwf commented Jan 21, 2016

@podsvirov has done quite some work to refine the cmake support. I believe installation is supported now but I don't know how it works with FindProtobuf. Feel free to send us a patch to tweak the cmake scripts to make it work better with FindProtobuf.

@Klaim
Copy link
Author

Klaim commented Jan 28, 2016

The *-config and *-package files should make it work as long as the user provides the package search path to the cmake directory. I will try these changes when I will have time but don't hold your breath, I'm in the middle of heavy developments and will not have time to focus on this in the coming weeks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants