Extract public/private libraries from scope for Examples
Public/public libraries were always processed from the global scope. Change-Id: I1223f04f100f91790ced1da41fda2fb9b52c5987 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
parent
5484629f2b
commit
decce2cd76
@ -3033,9 +3033,12 @@ def write_example(
|
|||||||
write_defines(
|
write_defines(
|
||||||
cm_fh, scope, f"target_compile_definitions({binary_name} PUBLIC", indent=indent, footer=")"
|
cm_fh, scope, f"target_compile_definitions({binary_name} PUBLIC", indent=indent, footer=")"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
(scope_public_libs, scope_private_libs) = extract_cmake_libraries(scope)
|
||||||
|
|
||||||
write_list(
|
write_list(
|
||||||
cm_fh,
|
cm_fh,
|
||||||
private_libs,
|
scope_private_libs,
|
||||||
"",
|
"",
|
||||||
indent=indent,
|
indent=indent,
|
||||||
header=f"target_link_libraries({binary_name} PRIVATE\n",
|
header=f"target_link_libraries({binary_name} PRIVATE\n",
|
||||||
@ -3043,7 +3046,7 @@ def write_example(
|
|||||||
)
|
)
|
||||||
write_list(
|
write_list(
|
||||||
cm_fh,
|
cm_fh,
|
||||||
public_libs,
|
scope_public_libs,
|
||||||
"",
|
"",
|
||||||
indent=indent,
|
indent=indent,
|
||||||
header=f"target_link_libraries({binary_name} PUBLIC\n",
|
header=f"target_link_libraries({binary_name} PUBLIC\n",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user