diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2023-05-10 13:47:33 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2023-05-11 13:09:36 +0000 |
commit | 569254b037761b7cde63c96d98373faa2992c6d7 (patch) | |
tree | 22dac24c674582cdbc79934130a8f71e808e5b2e /mkspecs | |
parent | d8a08ad213d258d41c11546cccbfa0aef3a3f20f (diff) |
iOS: Don't add Qt libraries to PRE_TARGETDEPS of xcodebuild Makefile
Support for PRE_TARGETDEPS was added for iOS applications in
53ac8094b13d52b7da8b029cf4716827241283c3, even if the Xcode
generator doesn't support PRE_TARGETDEPS, by taking advantage
of the glue Makefile we use to run xcodebuild.
And we add our own Qt libraries to PRE_TARGETDEPS in qt.prf,
as you would expect. But since Xcode supports both debug and
release, we always set debug_and_release for this glue Makefile.
The result is that when computing the Qt library PRE_TARGETDEPS,
we fail to apply a _debug suffix from qtPlatformTargetSuffix(),
since we've enabled debug_and_release.
In a debug only build, this means that 'make' of the glue Makefile
will fail to find the release versions of our Qt libraries.
To work around this we skip adding Qt to the target deps when
generating the xcodebuild Makefile, as we know these libraries
are added to the target in the Xcode project.
Change-Id: Icafc103e34a6f83240fa8187181d885fb0172a86
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 311f8157ae1aa77a0fb0154e8207678a0d919703)
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'mkspecs')
-rw-r--r-- | mkspecs/features/qt.prf | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mkspecs/features/qt.prf b/mkspecs/features/qt.prf index 3c4b284b68..114c729f86 100644 --- a/mkspecs/features/qt.prf +++ b/mkspecs/features/qt.prf @@ -249,15 +249,16 @@ for(ever) { } else { lib_bases = $$MODULE_MODULE$$qtPlatformTargetSuffix() darwin: lib_bases *= $$MODULE_MODULE + add_lib_to_pretargetdeps = false win32|contains(MODULE_CONFIG, staticlib) { lib_prefix = $$MODULE_LIBS/$$QMAKE_PREFIX_STATICLIB lib_suffixes = $$QMAKE_EXTENSION_STATICLIB lib_suffixes *= $$QMAKE_LIB_EXTENSIONS - add_lib_to_pretargetdeps = true + !xcodebuild: \ + add_lib_to_pretargetdeps = true } else { lib_prefix = $$MODULE_LIBS/$$QMAKE_PREFIX_SHLIB lib_suffixes = $$QMAKE_EXTENSION_SHLIB - add_lib_to_pretargetdeps = false } candidates = for(lib_base, lib_bases) { |