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
Any interest in better supporting library consumers who use CMake with find_package #2812
Comments
We already distribute pkg-config files. I do not see a problem with adding another file that will be useful for different use cases (CMake). The question is only how difficult it will be to generate and maintain it.
(Note that I have no experience with CMake.) |
Yes. I'll put together a native build example for CMake, and then another example that uses the PkgConfig export in two different branches for you. CMake itself generates most of the installation files when doing a native build. The more that existing tools can be relied on, the better. Other things of interest I just found:
Most importantly, I'm glad you are open to improving usage in CMake; some other packages are hostile to CMake - this is a nice change in pace 👍 . |
Where are all the Here's a prototype for a native CMake build. Based on the amount of conditional logic in the top level I'll send over the alternative option when I get time. |
Well, I thought all we need is some I thought about an alternative to pkg-config (libuuid/uuid.pc.in), or so. |
Craig Scott's book "Professional CMake" has chapter 35.9.2 on Other than |
It would be nice to keep it simple; it means a sed-like solution; just replace @anything@ with real data. See |
Could you elaborate the advantages of a new CMake script vs FindPkgConfig.cmake? The only additional feature I see in the linked implementation from Kitware is the construction of an imported target. But nowadays this can also be done with |
The goal is regardless of which method chosen, users of CMake has one here, but it doesn't support version arguments: It seems that using |
Use Case
I would like to use a tool such as LibUUID in a CMake project.
Similar to Kitware who need LibUUID in their code, the current approach would be to write my own find script.
util-linux has a ton of libraries, and I understand the maintenance burden of supporting another build system. On the other hand, some recommendations consider this as a bug that C++ libraries are missing basic CMake support.
Other approaches are rebuilding libuuid in another repository, but this neglects what the packaging maintainers of my system deem is appropriate.
The request
Is there any potential that
util-linux
could start to better support consumers who use CMake by distributing either find or config modules for libraries that include CMake targets that express their properties along with versioning information?Preferred Usage
Options Proposed
PkgConfig
support and distribute FindX.cmake for each library (can add to libraries on-at-a-time)The text was updated successfully, but these errors were encountered: