From 5c92a8b70a0349cc13a0758ef674cf817fc41381 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Mon, 14 Oct 2013 15:09:00 +0200 Subject: Xcode: Dynamically choose release/debug libs based on current configuration 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 Reviewed-by: Andy Shaw --- mkspecs/features/mac/default_pre.prf | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'mkspecs/features/mac/default_pre.prf') diff --git a/mkspecs/features/mac/default_pre.prf b/mkspecs/features/mac/default_pre.prf index e535c4d9e9..c0596d5ef0 100644 --- a/mkspecs/features/mac/default_pre.prf +++ b/mkspecs/features/mac/default_pre.prf @@ -23,3 +23,9 @@ isEmpty(QMAKE_XCODE_VERSION) { isEmpty(QMAKE_XCODE_VERSION): error("Could not resolve Xcode version.") unset(xcode_version) } + +# These two variables are used by the xcode_dynamic_library_suffix +# feature, which allows Xcode to choose the Qt libraries to link to +# at build time, depending on the current Xcode SDK and configuration. +QMAKE_XCODE_LIBRARY_SUFFIX = $$qtPlatformTargetSuffix() +QMAKE_XCODE_LIBRARY_SUFFIX_SETTING = QT_LIBRARY_SUFFIX -- cgit v1.2.3