From 64f62105ce8a1940125f3ae7b3fee14152f46944 Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Tue, 12 May 2020 10:55:37 +0200 Subject: [PATCH] CMake: pro2cmake: Fix cmake api detection for plugins We should search for the values of function names rather than the mapping key. Change-Id: Iedef7fcf4d716ff7f6d277d9626d9dc2dd781401 Reviewed-by: Joerg Bornemann --- util/cmake/pro2cmake.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/cmake/pro2cmake.py b/util/cmake/pro2cmake.py index f62d24a15c..1764868715 100755 --- a/util/cmake/pro2cmake.py +++ b/util/cmake/pro2cmake.py @@ -371,7 +371,7 @@ def detect_cmake_api_version_used_in_file_content(project_file_path: str) -> Opt with open(cmake_project_path, "r") as file_fd: contents = file_fd.read() - new_api_calls = [api_call for api_call in cmake_api_calls[2]] + new_api_calls = [cmake_api_calls[2][api_call] for api_call in cmake_api_calls[2]] new_api_calls_alternatives = "|".join(new_api_calls) match = re.search(new_api_calls_alternatives, contents)