-
Notifications
You must be signed in to change notification settings - Fork 999
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 the PKG_CONFIG_PATH
via CMake build helper or even CMakeToolchain
#11962
Comments
I'm trying to support cross-compilation of the |
Seems the workaround is not enough for all cases https://github.com/conan-io/conan-center-index/pull/13113/files#diff-8289c891f895abff6d3967ba098831643a3e8fa06472013c3ade6704c9206cb9R112-R117 |
@memsharded A few points about this issue and its possible solutions to discuss them:
I don't really know what could be the "best way" so I'd prefer to discuss it before starting any draft. |
* use is_mvc * use CMakeDeps fixes #13144 * use PkgConfigDeps * use modern CMake integration * debug cmake find package * work arround conan-io/conan#11962 * don't test with qmake on static qt * fix Invalid character escape cf conan-io/conan#10539
In conan-io/conan-center-index#12241 there was some wonky code to get the pkg_config support in CMake to work with the new generators
Part of the conversation (and linking to the solutions) seems like it could be continued here
After digging deeper into it, I figured out that CMake is adding the suffix
lib/pkgconfig
to theCMAKE_PREFIX_PATH
(pointing to thepackage_folder
where the*.pc
files are created). You can have a look at the issue https://gitlab.kitware.com/cmake/cmake/-/issues/18150Yes, you're right, but it should not be necessary as far as CMake should use that
CMAKE_PREFIX_PATH
by default. As I said above, CMake is adding that suffix, so it's getting failed because there are no PC files there.Given that information, I tend to say that yes, it could be one way to solve that issue, and I think there could be another workaround like:
Anyway, we could discuss if it could be a chance to create a mechanism to add the
PKG_CONFIG_PATH
via CMake build helper or even CMakeToolchain to avoid those workarounds.Originally posted by @franramirez688 in conan-io/conan-center-index#12241 (comment)
The text was updated successfully, but these errors were encountered: