summaryrefslogtreecommitdiffstats
path: root/util/cmake
diff options
context:
space:
mode:
authorLeander Beernaert <leander.beernaert@qt.io>2019-10-09 14:10:12 +0200
committerLeander Beernaert <leander.beernaert@qt.io>2019-10-09 12:15:13 +0000
commitdecce2cd76cefeaf86df796b16ebf1fecd6947bb (patch)
tree789d55f57ea12a92da27b3a5dee0320b00461117 /util/cmake
parent5484629f2b7e94abdc5f0ba69129a545fca7ea0e (diff)
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>
Diffstat (limited to 'util/cmake')
-rwxr-xr-xutil/cmake/pro2cmake.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/util/cmake/pro2cmake.py b/util/cmake/pro2cmake.py
index c24aab59ba..cf823c9f94 100755
--- a/util/cmake/pro2cmake.py
+++ b/util/cmake/pro2cmake.py
@@ -3033,9 +3033,12 @@ def write_example(
write_defines(
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(
cm_fh,
- private_libs,
+ scope_private_libs,
"",
indent=indent,
header=f"target_link_libraries({binary_name} PRIVATE\n",
@@ -3043,7 +3046,7 @@ def write_example(
)
write_list(
cm_fh,
- public_libs,
+ scope_public_libs,
"",
indent=indent,
header=f"target_link_libraries({binary_name} PUBLIC\n",