aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/dependencies/base.py
diff options
context:
space:
mode:
authorDaniel Mensinger <daniel@mensinger-ka.de>2020-01-25 15:03:33 +0100
committerJussi Pakkanen <jpakkane@gmail.com>2020-01-29 23:59:23 +0200
commit273aeb8473e005a426ece4b196f904a49545f61a (patch)
tree68c9e66702f74db01d11ed4d1cbf5d8498b43c13 /mesonbuild/dependencies/base.py
parent71baca7abe4dc3f6e11cf6147cf9841820244858 (diff)
downloadmeson-273aeb8473e005a426ece4b196f904a49545f61a.zip
meson-273aeb8473e005a426ece4b196f904a49545f61a.tar.gz
meson-273aeb8473e005a426ece4b196f904a49545f61a.tar.bz2
deps: Fix prelimenary CMake lookup.
The CMake config files / modules have to be checked case insensitive in some cases, otherwise some dependencies will not be found even though they are installed.
Diffstat (limited to 'mesonbuild/dependencies/base.py')
-rw-r--r--mesonbuild/dependencies/base.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py
index d89c00a..a0c5ad4 100644
--- a/mesonbuild/dependencies/base.py
+++ b/mesonbuild/dependencies/base.py
@@ -1084,6 +1084,7 @@ class CMakeDependency(ExternalDependency):
cm_args.append('-DCMAKE_PREFIX_PATH={}'.format(';'.join(pref_path)))
if not self._preliminary_find_check(name, cm_path, pref_path, environment.machines[self.for_machine]):
+ mlog.debug('Preliminary CMake check failed. Aborting.')
return
self._detect_dep(name, modules, cm_args)
@@ -1191,9 +1192,12 @@ class CMakeDependency(ExternalDependency):
if not self._cached_isdir(i):
continue
- for j in ['Find{}.cmake', '{}Config.cmake', '{}-config.cmake']:
- if os.path.isfile(os.path.join(i, j.format(name))):
- return True
+ # Check the directory case insensitve
+ content = self._cached_listdir(i)
+ candidates = ['Find{}.cmake', '{}Config.cmake', '{}-config.cmake']
+ candidates = [x.format(name).lower() for x in candidates]
+ if any([x[1] in candidates for x in content]):
+ return True
return False
# Search in <path>/(lib/<arch>|lib*|share) for cmake files