pro2cmake: Skip errors regarding not found generated .pri files

A lot of project files include files like qtsqldrivers-config.pri
which do not exist when running pro2cmake. It should be safe to hide
this error messages when converting projects.

Change-Id: I4205010e537f67f9b276b4cb94ec30f847c43c68
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Alexandru Croitor 2019-11-11 18:56:47 +01:00
parent 37ab7eae9d
commit 2c66bdde5a

View File

@ -3403,7 +3403,10 @@ def do_include(scope: Scope, *, debug: bool = False) -> None:
if not include_file:
continue
if not os.path.isfile(include_file):
print(f" XXXX: Failed to include {include_file}.")
generated_config_pri_pattern = re.compile(r"qt.+?-config\.pri$")
match_result = re.search(generated_config_pri_pattern, include_file)
if not match_result:
print(f" XXXX: Failed to include {include_file}.")
continue
include_result = parseProFile(include_file, debug=debug)