summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xutil/cmake/run_pro2cmake.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/util/cmake/run_pro2cmake.py b/util/cmake/run_pro2cmake.py
index cb7181449a..0db9f2a607 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