-
-
Notifications
You must be signed in to change notification settings - Fork 53
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
target_find_dependencies and pkg-config #253
Comments
I’m not quite sure what your question is. Are you trying to If that's the case, there is an official way for cmake to custom find_package, which might be helpful. You can see an actual example here, which is the CMake dependency provider for the Conan C and C++ package manager. |
Sure, so is there a way to inject a custom dependency provider into the project_options target_find_dependencies call? |
The situation is that PkgConfig dosen't provide find_package provider, so you have to. I think this won't break conan as both cmake-conan and vcpkg use this approach and project_options works well while enabling both What
When running To install
|
Is this fixed after #257? |
@aminya Possibly not. Instead of allowing custom Without modifying the
Another option could be extending target_find_dependencies(target
PUBLIC
# Syntax option 1
CUSTOM "pkg_check_modules(gio REQUIRED IMPORTED_TARGET gio-2.0)"
# Or syntax option 2?
CUSTOM pkg_check_modules gio REQUIRED IMPORTED_TARGET gio-2.0
) Please let me know if this is acceptable. If it is, which is the best syntax? |
I think the most versatile solution would be to add a way to provide a CMake script as an extension point (maybe allow multiple files?), eg: |
After setting If setting the
Another difference between setting dependency provider and just allowing |
I'm also unsure about what will happen if a user has a custom |
You could have My question here is that |
I guess the syntax on option 2 would be the best in this case than. |
I'm trying to use
target_find_dependencies
to add the dependencies for aSTATIC
library that depends on some libraries that can be found viapkg-config
, I'm able to pass thePkgConfig
package totarget_find_dependencies
but there doesn't seem to be an easy way to add thepkg_check_modules
calls to the CMake package config, is there any way I can solve this situation?My old
Config.cmake.in
file used to look like this:Upvote & Fund
@aminya is using Polar.sh so you can upvote and help fund this issue. The funding is received once the issue is completed & confirmed by you.
Thank you in advance for helping prioritize & fund our backlog!
The text was updated successfully, but these errors were encountered: