From 5592204b19a5dc46e308cc31ac035edb78d2d8fd Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Fri, 27 Nov 2020 20:19:07 +0100 Subject: CMake: Fix QMAKE_LIB of WrapOpenSSLHeaders library The correct entry for this lib is 'openssl/nolink', not 'openssl_headers'. In configurejson2cmake's helper.py we already have this information encoded such that the no_link_so_name field of 'openssl' points to 'openssl_headers'. Extend configurejson2cmake to take this into account, and re-generate src/network/configure.cmake. Pick-to: 6.0 Change-Id: I9817ea7722503a373d309b7e6fa201448d403e8d Reviewed-by: Alexandru Croitor --- util/cmake/helper.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'util') diff --git a/util/cmake/helper.py b/util/cmake/helper.py index 8a03176f8e..66426f9e50 100644 --- a/util/cmake/helper.py +++ b/util/cmake/helper.py @@ -661,6 +661,15 @@ def find_library_info_for_target(targetName: str) -> typing.Optional[LibraryMapp return None +# For a given qmake library (e.g. 'openssl_headers'), check whether this is a fake library used +# for the /nolink annotation, and return the actual annotated qmake library ('openssl/nolink'). +def find_annotated_qmake_lib_name(lib : str) -> str: + for entry in _library_map: + if entry.no_link_so_name == lib: + return entry.soName + "/nolink" + return lib + + def featureName(name: str) -> str: replacement_char = "_" if name.startswith("c++"): @@ -813,7 +822,7 @@ def generate_find_package_info( extra += ["PROVIDED_TARGETS", cmake_target_name] if module: extra += ["MODULE_NAME", module] - extra += ["QMAKE_LIB", lib.soName] + extra += ["QMAKE_LIB", find_annotated_qmake_lib_name(lib.soName)] result = "" one_ind = " " -- cgit v1.2.3