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

[PkgConfigDeps] Creates *.pc files for test_requires #11390

Conversation

franramirez688
Copy link
Contributor

@franramirez688 franramirez688 commented Jun 3, 2022

Changelog: Bugfix: PkgConfigDeps creates *.pc files for test_requires.
Docs: omit

Closes: #11376

@franramirez688 franramirez688 added this to the 1.50 milestone Jun 3, 2022
for _, dep in host_req.items():
build_req = self._conanfile.dependencies.direct_build
test_req = self._conanfile.dependencies.test
for _, dep in list(host_req.items()) + list(build_req.items()) + list(test_req.items()):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there any risk of pkg-config files from different contexts overriding each other? like build_requiries(protobuf) + requires(protobuf)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but that's a problem that you could even have with other components. Have a look at this PR #10263 So, you should change that pkg_config_name/pkg_config_aliases property.

assert "Requires: OpenCL" in get_requires_from_content(pc_content)


def test_pkgconfigdeps_with_test_requires():
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@memsharded This is the new one. The rest of the diff is only a code movement.

@memsharded memsharded merged commit 43a7ca7 into conan-io:develop Jun 3, 2022
@franramirez688 franramirez688 changed the title [PkgConfigDeps] Creates *.pc files for build_requires and test_requires [PkgConfigDeps] Creates *.pc files for test_requires Jun 7, 2022
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

Successfully merging this pull request may close these issues.

[question] PkgConfigDeps does not generate .pc files test_requires dependencies?
3 participants