CMake: Reformat python scripts

Change-Id: I1dfac318cdbbc4b4b7c76b113edca7db8f52f56b
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Alexandru Croitor 2020-04-06 09:42:01 +02:00
parent d64a7c9f5a
commit 9b21dbbd79
2 changed files with 10 additions and 9 deletions

View File

@ -865,9 +865,7 @@ def get_feature_mapping():
"enable": "TEST_posix_iconv AND TEST_iconv_needlib", "enable": "TEST_posix_iconv AND TEST_iconv_needlib",
"disable": "NOT TEST_posix_iconv OR NOT TEST_iconv_needlib", "disable": "NOT TEST_posix_iconv OR NOT TEST_iconv_needlib",
}, },
"precompile_header": { "precompile_header": {"condition": "BUILD_WITH_PCH"},
"condition": "BUILD_WITH_PCH"
},
"profile": None, "profile": None,
"qmakeargs": None, "qmakeargs": None,
"qpa_default_platform": None, # Not a bool! "qpa_default_platform": None, # Not a bool!
@ -876,7 +874,7 @@ def get_feature_mapping():
"rpath_dir": None, # merely used to fill the qmake variable EXTRA_RPATHS "rpath_dir": None, # merely used to fill the qmake variable EXTRA_RPATHS
"rpath": { "rpath": {
"autoDetect": "1", "autoDetect": "1",
"condition": "BUILD_SHARED_LIBS AND UNIX AND NOT WIN32 AND NOT ANDROID AND NOT APPLE" "condition": "BUILD_SHARED_LIBS AND UNIX AND NOT WIN32 AND NOT ANDROID AND NOT APPLE",
}, },
"sanitize_address": None, # sanitizer "sanitize_address": None, # sanitizer
"sanitize_memory": None, "sanitize_memory": None,
@ -893,9 +891,9 @@ def get_feature_mapping():
"type": "define", "type": "define",
"name": "QT_STATIC", "name": "QT_STATIC",
"prerequisite": "!defined(QT_SHARED) && !defined(QT_STATIC)", "prerequisite": "!defined(QT_SHARED) && !defined(QT_STATIC)",
"negative": True "negative": True,
} },
] ],
}, },
"silent": None, "silent": None,
"sql-sqlite": {"condition": "QT_FEATURE_datestring"}, "sql-sqlite": {"condition": "QT_FEATURE_datestring"},

View File

@ -201,11 +201,13 @@ def _parse_commandline():
) )
return parser.parse_args() return parser.parse_args()
def get_top_level_repo_project_path(project_file_path: str = "") -> str: def get_top_level_repo_project_path(project_file_path: str = "") -> str:
qmake_conf_path = find_qmake_conf(project_file_path) qmake_conf_path = find_qmake_conf(project_file_path)
qmake_conf_dir_path = os.path.dirname(qmake_conf_path) qmake_conf_dir_path = os.path.dirname(qmake_conf_path)
return qmake_conf_dir_path return qmake_conf_dir_path
def is_top_level_repo_project(project_file_path: str = "") -> bool: def is_top_level_repo_project(project_file_path: str = "") -> bool:
qmake_conf_path = find_qmake_conf(project_file_path) qmake_conf_path = find_qmake_conf(project_file_path)
qmake_conf_dir_path = os.path.dirname(qmake_conf_path) qmake_conf_dir_path = os.path.dirname(qmake_conf_path)
@ -3689,7 +3691,8 @@ def write_qml_plugin_epilogue(
cm_fh.write( cm_fh.write(
f"{indent_0}set_source_files_properties({qml_file} PROPERTIES\n" f"{indent_0}set_source_files_properties({qml_file} PROPERTIES\n"
f"{indent_1}QT_QML_SKIP_QMLDIR_ENTRY TRUE\n" f"{indent_1}QT_QML_SKIP_QMLDIR_ENTRY TRUE\n"
f"{indent_0})\n") f"{indent_0})\n"
)
cm_fh.write( cm_fh.write(
f"\n{indent_0}qt6_target_qml_files({target}\n{indent_1}FILES\n" f"\n{indent_0}qt6_target_qml_files({target}\n{indent_1}FILES\n"