cmake: Add support for the Linux CMake registry (fixes #9418)

This commit is contained in:
Daniel Mensinger 2021-10-21 19:23:36 +02:00 committed by Eli Schwartz
parent 5aeed25617
commit ffc8721465
1 changed files with 6 additions and 0 deletions

View File

@ -346,6 +346,12 @@ class CMakeDependency(ExternalDependency):
if env_path and find_module(env_path):
return True
# Check the Linux CMake registry
linux_reg = Path.home() / '.cmake' / 'packages'
for p in [linux_reg / name, linux_reg / lname]:
if p.exists():
return True
return False
def _detect_dep(self, name: str, package_version: str, modules: T.List[T.Tuple[str, bool]], components: T.List[T.Tuple[str, bool]], args: T.List[str]) -> None: