pro2cmake: Handle source files in example scopes
Change-Id: I653801d6b13eb144719a4e6eac4779b1cd15e75c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This commit is contained in:
parent
0a85f4f834
commit
dd57f99004
@ -2760,6 +2760,8 @@ def write_example(
|
||||
write_all_source_file_lists(cm_fh, scope, add_target, indent=0)
|
||||
cm_fh.write(")\n")
|
||||
|
||||
handling_first_scope = True
|
||||
|
||||
for scope in scopes:
|
||||
# write wayland already has condition scope handling
|
||||
write_wayland_part(cm_fh, binary_name, scope, indent=0)
|
||||
@ -2773,6 +2775,10 @@ def write_example(
|
||||
cm_fh.write(f"\n{spaces(indent)}if({condition})\n")
|
||||
indent += 1
|
||||
|
||||
if not handling_first_scope:
|
||||
target_sources = f"target_sources({binary_name} PUBLIC"
|
||||
write_all_source_file_lists(cm_fh, scope, target_sources, indent=indent, footer=")\n")
|
||||
|
||||
write_include_paths(
|
||||
cm_fh,
|
||||
scope,
|
||||
@ -2817,6 +2823,7 @@ def write_example(
|
||||
if condition != "ON":
|
||||
indent -= 1
|
||||
cm_fh.write(f"\n{spaces(indent)}endif()\n")
|
||||
handling_first_scope = False
|
||||
|
||||
if qmldir:
|
||||
write_qml_plugin_epilogue(cm_fh, binary_name, scope, qmldir, indent)
|
||||
|
Loading…
x
Reference in New Issue
Block a user