diff options
author | Tobias Hunger <tobias.hunger@qt.io> | 2019-04-12 11:53:38 +0200 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@qt.io> | 2019-04-12 11:35:18 +0000 |
commit | ce809cab29ff1d5c99fdbc6fdcab0960eaecdd4a (patch) | |
tree | e5273267afedf19c4894b09767cc48583ede6b8d /util | |
parent | 95cdb0d1ae62b4aa801eec32949ad18c61032e49 (diff) |
CMake: pro2cmake.py: Fix handling of libraries in QT
Change-Id: I5737a285ca0575a454e60fad231435d96b2f1be7
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'util')
-rwxr-xr-x | util/cmake/pro2cmake.py | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/util/cmake/pro2cmake.py b/util/cmake/pro2cmake.py index 75d52957a9..e7bb4f3fa2 100755 --- a/util/cmake/pro2cmake.py +++ b/util/cmake/pro2cmake.py @@ -961,17 +961,15 @@ def write_library_section(cm_fh: typing.IO[str], scope: Scope, if map_qt_library(q) not in known_libraries] for key in mixed: for lib in scope.expand(key): - if map_qt_library(lib) in known_libraries: + mapped_lib = map_qt_library(lib) + if mapped_lib in known_libraries: continue - if lib.endswith('-private'): - mapped_lib_name = map_qt_base_library(lib[0:-8]) - if mapped_lib_name: - private_dependencies.append(mapped_lib_name + 'Private') - public_dependencies.append(mapped_lib_name) - continue - - public_dependencies.append(lib) + if mapped_lib.endswith('Private'): + private_dependencies.append(mapped_lib) + public_dependencies.append(mapped_lib[:-7]) + else: + public_dependencies.append(mapped_lib) write_library_list(cm_fh, 'LIBRARIES', private_dependencies, indent=indent) write_library_list(cm_fh, 'PUBLIC_LIBRARIES', public_dependencies, indent=indent) |