Apple: Don't `_debug`-suffix libraries in single config framework builds
As part of fee1518294 we enabled framework
debug builds, which left us with an inconsistent library naming. The
framework libraries are always unsuffixed, e.g. QtGui.framework/QtGui,
while we were adding _debug suffixes to the plugins and static libs.
This was confusing macdeployqt, as it uses simple string matching logic
for "_debug_" to detect that a Qt build is a debug build, and since
the framework library didn't have a suffix it then failed to deploy
the suffixed plugins.
We now follow the requirement from the framework naming and skip the
suffixing for all libraries in this configuration.
Change-Id: I982253fc46c65aa3fab52f8658f62ef63cdac49f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit d3be87ff1d558f05309b1f29f7e71f291498584f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
bb10
parent
9758c1556c
commit
a68f5a12ce
|
|
@ -494,7 +494,15 @@ function(qt_internal_setup_cmake_config_postfix)
|
|||
set(default_cmake_debug_postfix "d")
|
||||
endif()
|
||||
elseif(APPLE)
|
||||
set(default_cmake_debug_postfix "_debug")
|
||||
# Only add a suffix for explicit no-framework builds.
|
||||
# For framework builds the library inside the framework
|
||||
# is always unsuffixed, and we want to match that for
|
||||
# plugins and other non-framework (static) libraries.
|
||||
if(NOT (QT_FEATURE_framework OR FEATURE_framework
|
||||
# Account for default in configure.json being ON
|
||||
OR (NOT DEFINED QT_FEATURE_framework AND NOT DEFINED FEATURE_framework)))
|
||||
set(default_cmake_debug_postfix "_debug")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(custom_postfix_vars "")
|
||||
|
|
|
|||
|
|
@ -643,6 +643,8 @@ qt_feature("force_asserts" PUBLIC
|
|||
qt_feature("framework" PUBLIC
|
||||
LABEL "Build Apple Frameworks"
|
||||
AUTODETECT ON
|
||||
# If changing this, please align with logic in
|
||||
# qt_internal_setup_cmake_config_postfix.
|
||||
CONDITION APPLE
|
||||
)
|
||||
qt_feature_definition("framework" "QT_MAC_FRAMEWORK_BUILD")
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ endif()
|
|||
## Scopes:
|
||||
#####################################################################
|
||||
|
||||
qt_internal_extend_target(tst_qpluginloader CONDITION QT_FEATURE_private_tests
|
||||
qt_internal_extend_target(tst_qpluginloader
|
||||
LIBRARIES
|
||||
Qt::CorePrivate
|
||||
)
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@
|
|||
#include <QScopeGuard>
|
||||
#include "theplugin/plugininterface.h"
|
||||
|
||||
#include <QtCore/private/qglobal_p.h>
|
||||
|
||||
#if defined(QT_BUILD_INTERNAL) && defined(Q_OF_MACH_O)
|
||||
# include <QtCore/private/qmachparser_p.h>
|
||||
#endif
|
||||
|
|
@ -33,10 +35,10 @@ using namespace Qt::StringLiterals;
|
|||
# define bundle_VALID true
|
||||
# define dylib_VALID true
|
||||
# define so_VALID true
|
||||
# ifdef QT_NO_DEBUG
|
||||
# define SUFFIX ".dylib"
|
||||
# else
|
||||
# if QT_CONFIG(debug) && !QT_CONFIG(framework)
|
||||
# define SUFFIX "_debug.dylib"
|
||||
# else
|
||||
# define SUFFIX ".dylib"
|
||||
# endif
|
||||
# define PREFIX "lib"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue