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 <alexandru.croitor@qt.io>
This commit is contained in:
Cristián Maureira-Fredes 2019-09-19 14:21:43 +02:00 committed by Cristian Maureira-Fredes
parent cd88c30ce3
commit 9bc3968aae

View File

@ -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) project_relative_path = os.path.relpath(project_file_path, qmake_conf_dir_path)
# If the project file is found in a subdir called 'examples' # If the project file is found in a subdir called 'examples'
# relative to the repo source dir, then it must be an example. # relative to the repo source dir, then it must be an example, but
return project_relative_path.startswith("examples") # 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]: def find_qmake_conf(project_file_path: str = "") -> Optional[str]: