CMake: pro2cmake.py: Do not fail when run from .pro-file directory

Change-Id: I285b05986e3a58efc060ca0b5732f6e3f5121476
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Tobias Hunger 2019-05-08 13:14:37 +02:00
parent 9d96c8da78
commit 0c498ef4ff

View File

@ -1571,7 +1571,8 @@ def main() -> None:
for file in args.files:
new_current_dir = os.path.dirname(file)
file_relative_path = os.path.basename(file)
os.chdir(new_current_dir)
if new_current_dir:
os.chdir(new_current_dir)
parseresult = parseProFile(file_relative_path, debug=debug_parsing)