diff options
author | Tobias Hunger <tobias.hunger@qt.io> | 2019-03-28 15:25:17 +0100 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@qt.io> | 2019-04-10 09:36:40 +0000 |
commit | 92b0d7b9110dde7db56f10d7c34a21876fb27fe3 (patch) | |
tree | c232918e84cf0ee74bf4352f7b47135ff0f4e0dd /util/cmake/helper.py | |
parent | be0cf9f8d7bb23936301eadd2af1e4172d1b9f0e (diff) |
CMake: Support /nolink libraries
Add a helper function to QtBuild that generates Foo_nolink versions
of Foo library targets.
Map 'Foo/nolink' libs found in qmake to Foo_nolink.
Automatically run helper function to create _nolink targets as
part of extend_target.
Change-Id: I4c23ea68b3037d23c9a31d4ac272a6bd0565f7c0
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'util/cmake/helper.py')
-rw-r--r-- | util/cmake/helper.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/util/cmake/helper.py b/util/cmake/helper.py index f5573c3fac..9de01df32f 100644 --- a/util/cmake/helper.py +++ b/util/cmake/helper.py @@ -232,6 +232,7 @@ libray_mapping = { 'libudev': 'PkgConfig::Libudev', 'mtdev': 'PkgConfig::Mtdev', 'odbc': 'ODBC::ODBC', + 'openssl': 'OpenSSL::SSL', 'pcre2': 'PCRE2', 'psql': 'PostgreSQL::PostgreSQL', 'sqlite': 'SQLite::SQLite3', @@ -263,4 +264,8 @@ libray_mapping = { def substitute_libs(lib: str) -> str: - return libray_mapping.get(lib, lib) + libpostfix = '' + if lib.endswith('/nolink'): + lib = lib[:-7] + libpostfix = '_nolink' + return libray_mapping.get(lib, lib) + libpostfix |