summaryrefslogtreecommitdiffstats
path: root/mkspecs
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2019-01-11 16:10:54 +0100
committerJani Heikkinen <jani.heikkinen@qt.io>2019-01-13 18:17:43 +0000
commit69bd238ad86abfe725d90707f3b578f5d766ba3c (patch)
treee31ad6201072e471af79147fe553a8d305050971 /mkspecs
parentf1aa4c076fd10ededea3e87b7f53da2c0be84906 (diff)
Fix resolving of libraries on Apple platforms
Qt couldn't be configured with -system-zlib on macOS, because qmake failed to find "/usr/lib/libz.dylib". The library path is something along the lines of "/Applications/Xcode.app/.../MacOSX10.14.sdk/usr/lib" which doesn't contain "libz.dylib". But it contains "libz.tbd", which is a YAML-file pointing to "/usr/lib/libz.dylib". One can pass the absolute path to this tbd file to the linker, which will then pick up "/usr/lib/libz.dylib". Introduce a new variable QMAKE_EXTENSIONS_AUX_SHLIB, which is a list of auxiliary extensions for shared libs, and add the "tbd" extension to it on macOS. Change-Id: I083b79a69d00232e35f9d6164ffa86cb473f1742 Fixes: QTBUG-72745 Fixes: QTBUG-72964 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'mkspecs')
-rw-r--r--mkspecs/common/mac.conf1
-rw-r--r--mkspecs/features/qt_configure.prf5
2 files changed, 5 insertions, 1 deletions
diff --git a/mkspecs/common/mac.conf b/mkspecs/common/mac.conf
index 61bea952b2..b77494ec9b 100644
--- a/mkspecs/common/mac.conf
+++ b/mkspecs/common/mac.conf
@@ -14,6 +14,7 @@ include(unix.conf)
QMAKE_RESOURCE = /Developer/Tools/Rez
QMAKE_EXTENSION_SHLIB = dylib
+QMAKE_EXTENSIONS_AUX_SHLIB = tbd
QMAKE_LIBDIR =
# sdk.prf will prefix the proper SDK sysroot
diff --git a/mkspecs/features/qt_configure.prf b/mkspecs/features/qt_configure.prf
index 87190bc52a..c45439c3ef 100644
--- a/mkspecs/features/qt_configure.prf
+++ b/mkspecs/features/qt_configure.prf
@@ -531,8 +531,11 @@ defineTest(qtConfResolveLibs) {
unix {
# Under UNIX, we look for actual shared libraries, in addition
# to static ones.
+ shexts = $$QMAKE_EXTENSION_SHLIB $$QMAKE_EXTENSIONS_AUX_SHLIB
+ for (ext, shexts) {
+ lcan += $${QMAKE_PREFIX_SHLIB}$${lib}.$${ext}
+ }
lcan += \
- $${QMAKE_PREFIX_SHLIB}$${lib}.$${QMAKE_EXTENSION_SHLIB} \
$${QMAKE_PREFIX_STATICLIB}$${lib}.$${QMAKE_EXTENSION_STATICLIB}
} else {
# Under Windows, we look only for static libraries, as even for DLLs