-
Notifications
You must be signed in to change notification settings - Fork 21
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
Hook for libraries without pkg-config support #3
Comments
@gdesmott This was accidentally closed instead of the other issue |
Oups, thanks :) |
Definitely would be handy for myself; I'm doing a search for packages via CMake's system. |
How do you handle CMake's system though? It seems rather non-trivial, see e.g. this. From what I understand in meson they create a small temporary cmake build system just for doing dependency checks, and from looking at the code of that it doesn't seem very easy. But if you want to implement something around that, that would be great :) |
@jalcine which CMake libraries not shipping pkg-config file are you looking to support? I'm wondering if they are that common. From the common above supporting those seems a lot of work, much more than shipping a pkg-config file in those libraries I suspect. |
Yeah CMake modules are not really meant to be used outside CMake, they need to be interpreted by it. But there are quite a few projects only shipping a CMake module unfortunately. The other more easy case is the |
I wonder what would be the correct way to handle Windows builds? If you get a Gnu toolchain pkg-config is a thing, but in the MSVC world it seems to be not so much a thing. Not sure what the correct approach would be. |
There isn't really one. Some things are using CMake, others use pkg-config, others have nothing |
So I'm still working on this but I figured how to resolve my dependencies from CMake via Cargo. I build a project that links against everything I needed and then write out properties that hold information I'd want to the cache (include dirs, compiler flags, library linking search paths, etc). I then use `cmake -LA` to find those properties and parse them out.
It's definitely rough of a solution and I can see a lot of cleanup for it but I think it's the way outside of just using something like Meson for building Rust projects.
…On Sat, Nov 28, 2020, at 08:48, Sebastian Dröge wrote:
There isn't really one. Some things are using CMake, others use
pkg-config, others have nothing
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AADOMBESL436G245VEVJDMTSSESU5ANCNFSM4MXC2HMQ>.
|
@jalcine That's basically what meson is doing for its cmake dependency resolver that I mentioned above. That's definitely a possible approach |
Ah I didn't know that! Tbh if this works, I can work on a crate to abstract this for other projects (I def do want to do this).
For context, I'm doing this for a KDE cross platform application and KDE goes all in on CMake (for some reason).
…On Sat, Nov 28, 2020, at 08:59, Sebastian Dröge wrote:
@jalcine <https://github.com/jalcine> That's basically what meson is
doing for its cmake dependency resolver that I mentioned above. That's
definitely a possible approach
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AADOMBEBLHQREQHSAUT2NCDSSET7XANCNFSM4MXC2HMQ>.
|
This could then be used to run things like
sdl2-config
, and similar to retrieve the same information. Crates could provide code to extract these things and then provide the same information as pkg-config to metadeps.The text was updated successfully, but these errors were encountered: