diff --git a/util/cmake/run_pro2cmake.py b/util/cmake/run_pro2cmake.py index cb7181449a4..0db9f2a6071 100755 --- a/util/cmake/run_pro2cmake.py +++ b/util/cmake/run_pro2cmake.py @@ -77,7 +77,9 @@ def find_all_pro_files(base_path: str, args: argparse.Namespace): """ Sorter that tries to prioritize main pro files in a directory. """ pro_file_without_suffix = pro_file.rsplit("/", 1)[-1][:-4] dir_name = os.path.dirname(pro_file) - if dir_name.endswith("/" + pro_file_without_suffix): + if dir_name == ".": + dir_name = os.path.basename(os.getcwd()) + if dir_name.endswith(pro_file_without_suffix): return dir_name return dir_name + "/__" + pro_file