From 9bc3968aae124cb5d9313a2dcae07deb9990f08b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cristi=C3=A1n=20Maureira-Fredes?= Date: Thu, 19 Sep 2019 14:21:43 +0200 Subject: [PATCH] pro2cmake: exclude 3rdparty libs from examples There are some libraries inside examples that cannot be properly translated due to the fact that the is_example variable is True. This condition excludes it, for example: qtmultimedia/examples/multimedia/spectrum/3rdparty/fftreal/ Change-Id: I68a1e7d1684ab4604f54b6d16bf88d04e3214ba9 Reviewed-by: Alexandru Croitor --- util/cmake/pro2cmake.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/util/cmake/pro2cmake.py b/util/cmake/pro2cmake.py index 2985b3a4b1..51cce8027c 100755 --- a/util/cmake/pro2cmake.py +++ b/util/cmake/pro2cmake.py @@ -188,8 +188,11 @@ def is_example_project(project_file_path: str = "") -> bool: project_relative_path = os.path.relpath(project_file_path, qmake_conf_dir_path) # If the project file is found in a subdir called 'examples' - # relative to the repo source dir, then it must be an example. - return project_relative_path.startswith("examples") + # relative to the repo source dir, then it must be an example, but + # some examples contain 3rdparty libraries that do not need to be + # built as examples. + return (project_relative_path.startswith("examples") + and "3rdparty" not in project_relative_path) def find_qmake_conf(project_file_path: str = "") -> Optional[str]: