diff --git a/pycheribuild/projects/simple_project.py b/pycheribuild/projects/simple_project.py index bf01654b4..df7f86cc3 100644 --- a/pycheribuild/projects/simple_project.py +++ b/pycheribuild/projects/simple_project.py @@ -821,7 +821,7 @@ def check_required_pkg_config(self, package: str, instructions: InstallInstructi return # already checked self._validate_cheribuild_target_for_system_deps(instructions.cheribuild_target) try: - self.run_cmd(["pkg-config", "--exists", package]) + self.run_cmd(["pkg-config", "--modversion", package], capture_output=True) except subprocess.CalledProcessError as e: self.dependency_error("Required library", package, "is missing:", e, install_instructions=instructions, cheribuild_target=instructions.cheribuild_target,