diff --git a/cross/linux-mingw-w64-32bit.txt b/cross/linux-mingw-w64-32bit.txt index a62f57f9b..e29aa464c 100644 --- a/cross/linux-mingw-w64-32bit.txt +++ b/cross/linux-mingw-w64-32bit.txt @@ -7,6 +7,7 @@ pkgconfig = '/usr/bin/i686-w64-mingw32-pkg-config' windres = '/usr/bin/i686-w64-mingw32-windres' exe_wrapper = 'wine' ld = '/usr/bin/i686-w64-mingw32-ld' +cmake = '/usr/bin/cmake' [properties] # Directory that contains 'bin', 'lib', etc diff --git a/cross/linux-mingw-w64-64bit.txt b/cross/linux-mingw-w64-64bit.txt index 36d73500a..261dad0f1 100644 --- a/cross/linux-mingw-w64-64bit.txt +++ b/cross/linux-mingw-w64-64bit.txt @@ -6,6 +6,7 @@ strip = '/usr/bin/x86_64-w64-mingw32-strip' pkgconfig = '/usr/bin/x86_64-w64-mingw32-pkg-config' windres = '/usr/bin/x86_64-w64-mingw32-windres' exe_wrapper = 'wine64' +cmake = '/usr/bin/cmake' [properties] # Directory that contains 'bin', 'lib', etc diff --git a/mesonbuild/cmake/interpreter.py b/mesonbuild/cmake/interpreter.py index 5797c0dda..4fac7b1d4 100644 --- a/mesonbuild/cmake/interpreter.py +++ b/mesonbuild/cmake/interpreter.py @@ -850,6 +850,7 @@ class CMakeInterpreter: def configure(self, extra_cmake_options: T.List[str]) -> CMakeExecutor: # Find CMake + # TODO: Using MachineChoice.BUILD should always be correct here, but also evaluate the use of self.for_machine cmake_exe = CMakeExecutor(self.env, '>=3.7', MachineChoice.BUILD) if not cmake_exe.found(): raise CMakeException('Unable to find CMake') diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py index 9026876ff..6f568d37e 100644 --- a/mesonbuild/dependencies/base.py +++ b/mesonbuild/dependencies/base.py @@ -1098,10 +1098,11 @@ class CMakeDependency(ExternalDependency): # AttributeError exceptions in derived classes self.traceparser = None # type: CMakeTraceParser - self.cmakebin = CMakeExecutor(environment, CMakeDependency.class_cmake_version, MachineChoice.BUILD, silent=self.silent) + # TODO further evaluate always using MachineChoice.BUILD + self.cmakebin = CMakeExecutor(environment, CMakeDependency.class_cmake_version, self.for_machine, silent=self.silent) if not self.cmakebin.found(): self.cmakebin = None - msg = 'No CMake binary for machine {} not found. Giving up.'.format(MachineChoice.BUILD) + msg = 'No CMake binary for machine {} not found. Giving up.'.format(self.for_machine) if self.required: raise DependencyException(msg) mlog.debug(msg)