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

Install pkgconfig files from CMake installation #215

Closed
metthal opened this issue Aug 24, 2019 · 6 comments
Closed

Install pkgconfig files from CMake installation #215

metthal opened this issue Aug 24, 2019 · 6 comments

Comments

@metthal
Copy link
Contributor

metthal commented Aug 24, 2019

We were discussing this with Paul on gerrit here but to sum it up.

Right now, all popular Linux distributions package re2 from GNU make build which installs pkgconfig pc files. However this is not an ideal situation for people who use CMake in their projects. They can't do find_package(re2) in their project out of the box. The usual approach then is to write your own finder that will use pkgconfig to generate CMake targets but it's much better if projects provide their own. CMake build system in RE2 already generate all the necessary files for doing just find_package(re2) but it does not install pkgconfig files. That way, package maintainers for Fedora, Ubuntu, Arch, ... can't really use CMake and not break existing packages which rely on pkgconfig. I have provided patch for that but Paul asked me to write this issue to start the discussion regarding this matter.

There is also another thing which is that Red Hat based distributions should have 64-bit libraries installed in /usr/lib64 but through CMake, RE2 installs itself into /usr/lib. Therefore we also need GNUInstallDirs which work just find even on Windows and macOS.

cc @SuperWig

@SuperWig
Copy link

Well regarding pkgconfig, I'm not familar with it in the slightest so can't add input to that.

However this notification reminded me that I was working on getting the CMakeLists to be target based a couple months back.

SuperWig@79362c3

@junyer
Copy link
Contributor

junyer commented Aug 26, 2019

Thanks for filing the issue, @metthal, and thanks for responding, @SuperWig. The discussion that I anticipated hasn't eventuated, so let's move forward with the proposed change and see if someone complains later. :)

@ghost ghost closed this as completed in 7a10064 Aug 26, 2019
@junyer
Copy link
Contributor

junyer commented Aug 26, 2019

With GNU make, libre2.a and libre2.so are built. With CMake, libre2.a xor libre2.so is built. The difference is going to matter to package maintainers, presumably. Note also that the filename is baked into re2Config-release.cmake. :(

@junyer
Copy link
Contributor

junyer commented Aug 27, 2019

I don't mind keeping the GNUInstallDirs part of the change because handling lib versus lib64 et cetera is worthwhile, but if CMake doesn't support building libre2.a and libre2.so together and installing them together, then I think I'm going to have to undo the re2.pc part of the change.

@junyer junyer reopened this Aug 27, 2019
@ghost ghost closed this as completed in 5bd6137 Aug 27, 2019
@metthal
Copy link
Contributor Author

metthal commented Aug 30, 2019

I think it would be possible to somehow do that. I'm just kinda busy last several days. I'll probably message you one more time once I resolve simultaneous installation of static and dynamic library.

@junyer
Copy link
Contributor

junyer commented Aug 31, 2019

No worries. Just reopen this issue. :)

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

No branches or pull requests

3 participants