5c92a8b70a
Non-framework builds would automatically link to whatever Qt library matched the config at the time of running qmake, eg hard-coded to libQtCore_debug, while Xcode itself allowed the user to switch between release and debug configurations. We now append an Xcode settings variable to the library path, which gets resolved at build time depending on the current config in Xcode. Change-Id: I12873e38a28d9595ef3fd0ae0ad849e6744833a9 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Andy Shaw <andy.shaw@digia.com>
70 lines
1.8 KiB
Plaintext
70 lines
1.8 KiB
Plaintext
#
|
|
# W A R N I N G
|
|
# -------------
|
|
#
|
|
# This file is not part of the Qt API. It exists purely as an
|
|
# implementation detail. It may change from version to version
|
|
# without notice, or even be removed.
|
|
#
|
|
# We mean it.
|
|
#
|
|
|
|
staticlib: \
|
|
CONFIG += static
|
|
else: dll: \
|
|
CONFIG += shared
|
|
|
|
CONFIG(static, static|shared) {
|
|
CONFIG -= shared dll
|
|
contains(TEMPLATE, ".*lib"): CONFIG += staticlib
|
|
} else {
|
|
CONFIG -= static staticlib
|
|
contains(TEMPLATE, ".*lib"): CONFIG += dll
|
|
}
|
|
|
|
static_and_shared {
|
|
!macx-xcode: addExclusiveBuilds(static, Static, shared, Shared)
|
|
} else: fix_output_dirs {
|
|
static: \
|
|
fixExclusiveOutputDirs(static, shared)
|
|
else: \
|
|
fixExclusiveOutputDirs(shared, static)
|
|
}
|
|
|
|
CONFIG(debug, debug|release): \
|
|
CONFIG -= release
|
|
else: \
|
|
CONFIG -= debug
|
|
|
|
!macx-xcode {
|
|
debug_and_release {
|
|
addExclusiveBuilds(debug, Debug, release, Release)
|
|
} else: fix_output_dirs {
|
|
debug: \
|
|
fixExclusiveOutputDirs(debug, release)
|
|
else: \
|
|
fixExclusiveOutputDirs(release, debug)
|
|
}
|
|
} else {
|
|
# The Xcode generator always generates project files with
|
|
# debug and release configurations, regardless of whether
|
|
# or not debug_and_release is active.
|
|
for(build, $$list(debug release)) {
|
|
suffix =
|
|
contains(QT_CONFIG, debug_and_release) {
|
|
equals(build, debug): \
|
|
suffix = _debug
|
|
} else {
|
|
contains(QT_CONFIG, debug): \
|
|
suffix = _debug
|
|
}
|
|
|
|
library_suffix_$${build}.name = $$QMAKE_XCODE_LIBRARY_SUFFIX_SETTING
|
|
library_suffix_$${build}.value = $$suffix
|
|
library_suffix_$${build}.build = $$build
|
|
QMAKE_MAC_XCODE_SETTINGS += library_suffix_$${build}
|
|
|
|
CONFIG *= xcode_dynamic_library_suffix
|
|
}
|
|
}
|