|
|
|
@ -414,7 +414,16 @@ class CMakeDependency(ExternalDependency): |
|
|
|
|
# Whether the package is found or not is always stored in PACKAGE_FOUND |
|
|
|
|
self.is_found = self.traceparser.var_to_bool('PACKAGE_FOUND') |
|
|
|
|
if not self.is_found: |
|
|
|
|
return |
|
|
|
|
not_found_message = self.traceparser.get_cmake_var('PACKAGE_NOT_FOUND_MESSAGE') |
|
|
|
|
if len(not_found_message) > 0: |
|
|
|
|
mlog.warning( |
|
|
|
|
'CMake reported that the package {} was not found with the following reason:\n' |
|
|
|
|
'{}'.format(name, not_found_message[0])) |
|
|
|
|
else: |
|
|
|
|
mlog.warning( |
|
|
|
|
'CMake reported that the package {} was not found, ' |
|
|
|
|
'even though Meson\'s preliminary check succeeded.'.format(name)) |
|
|
|
|
raise self._gen_exception('PACKAGE_FOUND is false') |
|
|
|
|
|
|
|
|
|
# Try to detect the version |
|
|
|
|
vers_raw = self.traceparser.get_cmake_var('PACKAGE_VERSION') |
|
|
|
|