diff options
author | Tobias Hunger <tobias.hunger@qt.io> | 2019-05-09 11:07:02 +0200 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@qt.io> | 2019-05-09 13:14:45 +0000 |
commit | e9085f4162ec172b9a5a5e3f9148e058fe1787cb (patch) | |
tree | 146add62445fc527acd8b765689a47feb6ff7a1a /util | |
parent | 35ed41e547421f6594f76576c5074b1fe18e37d7 (diff) |
CMake: pro2cmake.py: Add target_link_libraries to examples
Change-Id: Ic7054f0c88e228496b7f4855bffa5620ed717f9b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'util')
-rwxr-xr-x | util/cmake/pro2cmake.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/util/cmake/pro2cmake.py b/util/cmake/pro2cmake.py index fec76f286c..0851181a25 100755 --- a/util/cmake/pro2cmake.py +++ b/util/cmake/pro2cmake.py @@ -1570,6 +1570,10 @@ def write_example(cm_fh: typing.IO[str], scope: Scope, indent=0, footer=')') write_defines(cm_fh, scope, 'target_compile_definitions({}'.format(binary_name), indent=0, footer=')') + write_list(cm_fh, private_libs, '', indent=indent, + header='target_link_libraries({} PRIVATE\n'.format(binary_name), footer=')') + write_list(cm_fh, public_libs, '', indent=indent, + header='target_link_libraries({} PUBLIC\n'.format(binary_name), footer=')') write_compile_options(cm_fh, scope, 'target_compile_options({}'.format(binary_name), indent=0, footer=')') |