qt5base-lts/mkspecs/features
Tor Arne Vestbø e2446afaa1 qmake: Resolve target suffix based on Qt build config for static plugins
The qtPlatformTargetSuffix() function is used in various places to
determine the suffix of targets based on the config, which for macOS
will result in a _debug suffix in debug mode.

This becomes tricky when one project built in debug mode tries to depend
on the libraries/plugins of another project (Qt) built in release, as
the qtPlatformTargetSuffix() function uses the current CONFIG as input,
which may be different than the QT_CONFIG (or CONFIG of whatever project
is being depended on).

For libraries this was fixed in 50e664835b
by iterating all known library paths, and trying the CONFIG suffix before
falling back to release version.

For plugins this was never solved, which becomes an issue when linking
to static plugins, either in a fully static build of Qt, or when some
of the plugins are static (permission plugins e.g.).

In this situation, the user project has to have the same configuration
as Qt was built with, to avoid errors like:

 error: no such file or directory: '~/6.x-static/qtbase/plugins/platforms/libqcocoa_debug.a'

To work around this, we assume that a plugin installed into the Qt
tree has the same build configuration as Qt itself, then then use
QT_CONFIG as the determining factor when linking to the plugin.

This still ties the build config of the plugin to the config of Qt,
but relaxes the relationship to the application, allowing it to be
built in either debug or release, which is an improvement to the
current state.

Pick-to: 6.5 6.5.0
Task-number: QTBUG-110356
Change-Id: Icee67fc01313a6c6f34178a6345ccae1b57429d7
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-03-04 16:54:56 +01:00
..
android Revert "Revert "Add support for MultiABI with custom install dir of the android-build"" 2023-02-02 19:03:36 +01:00
data Remove qmake files that provide support for building Qt modules 2023-02-27 10:10:09 +01:00
mac Guard some qmake 'simulator' conditions with iOS scope 2022-10-05 09:07:03 +02:00
uikit Remove qmake files that provide support for building Qt modules 2023-02-27 10:10:09 +01:00
unix CMake: fix the word order in "no_direct_extern_access" 2022-07-20 14:54:20 -07:00
unsupported Revert "Disable Docker-based test servers on Windows temporarily" 2019-07-09 13:49:18 +02:00
wasm wasm: Flesh out side module and main module logic for shared builds 2023-01-02 14:50:51 +01:00
win32 Remove qmake files that provide support for building Qt modules 2023-02-27 10:10:09 +01:00
benchmark.prf
build_pass.prf
cmake_functions.prf CMake: Don't hard-code the sysroot in Qt5XXXConfigExtras.cmake 2020-05-14 21:36:59 +02:00
cmdline.prf Add cmdline feature to qmake 2019-02-18 07:12:14 +00:00
configure_base.prf configure: cache test output as well 2018-04-10 18:51:13 +00:00
configure.prf Remove winrt 2020-06-06 20:25:49 +02:00
coverage.prf configure: Add switch for clang's "source-based" code coverage feature 2020-01-28 20:26:15 +00:00
create_cmake.prf Merge remote-tracking branch 'origin/5.14' into 5.15 2020-01-29 01:00:56 +01:00
ctest_testcase_common.prf Remove ANGLE 2020-05-26 15:11:40 +02:00
ctest_testcase_installed.prf
ctest_testcase.prf
dbusadaptors.prf
dbuscommon.pri
dbusinterfaces.prf
declarative_debug.prf
default_post.prf qmake: Add support for C++23 2022-04-05 14:27:50 +02:00
default_pre.prf Remove last trace of licheck 2021-04-07 11:00:41 +00:00
designer_defines.prf
device_config.prf
egl.prf qmake: make CONFIG+=egl work again 2019-01-07 19:07:02 +00:00
entrypoint.prf Move iOS entrypoint logic to entrypoint library 2020-11-10 16:53:31 +01:00
exceptions_off.prf
exceptions.prf
exclusive_builds_post.prf Say hello to Android multi arch build in one go 2019-08-26 12:59:15 +03:00
exclusive_builds.prf Fix duplicates in QMAKE_DIR_REPLACE 2019-07-10 12:35:52 +02:00
file_copies.prf qmake: Fix COPIES for Visual Studio projects 2019-02-21 06:43:56 +00:00
gc_binaries.prf Make the use of -fdata-sections and --gc-sections more generic in Qt 2018-04-27 06:47:35 +00:00
gcov.prf
include_source_dir.prf
incredibuild_xge.prf
java.prf Android: bump default javac build versions to 8 2020-09-16 20:55:10 +03:00
lex.prf Fix parallel lex/yacc invocation for debug_and_release builds 2019-06-06 15:21:37 +02:00
link_ltcg.prf
link_pkgconfig.prf
lrelease.prf Fix .qm file name calculation in lrelease.prf 2021-09-10 23:27:15 +02:00
ltcg.prf Merge remote-tracking branch 'origin/5.13' into 5.14 2019-11-13 07:21:33 +01:00
metatypes.prf CMake: install the metatypes inside Qt's own arch-specific data dir 2022-11-28 10:58:13 -08:00
moc.prf Move build tools to libexec instead of the bin dir 2021-02-23 17:02:30 +01:00
no_debug_info.prf
permissions.prf Adjust permissions.prf plist path handling 2023-02-13 15:41:51 +02:00
plugin_bundle.prf
precompile_header.prf
qgltf.prf
qlalr.prf Move build tools to libexec instead of the bin dir 2021-02-23 17:02:30 +01:00
qmake_use.prf Revert "configure: actually resolve libraries into full filepaths" 2019-09-13 10:47:38 +02:00
qml_debug.prf
qml_module.prf Android: Install the qmldir files when configuring for a single abi 2020-08-03 16:47:31 +02:00
qml_plugin.prf qml_plugin.prf: Use and prefer QML_IMPORT_VERSION over IMPORT_VERSION 2020-01-17 11:16:44 +01:00
qmltestcase.prf Fix running qml tests on Android 2020-08-24 14:50:56 +03:00
qt_config.prf qmake: Introduce QT_HOST_LIBEXECS property 2021-02-18 11:46:42 +01:00
qt_functions.prf qmake: Resolve target suffix based on Qt build config for static plugins 2023-03-04 16:54:56 +01:00
qt.prf qmake: Resolve target suffix based on Qt build config for static plugins 2023-03-04 16:54:56 +01:00
resolve_config.prf
resolve_target.prf Use 'A' for Apple framework version instead of Qt major version 2020-09-23 16:59:06 +02:00
resources_functions.prf Fix condition that adds resources for each Android ABI 2021-04-07 17:00:17 +02:00
resources.prf rcc: teach qmake not to use zstd when not available 2022-07-06 19:41:31 +03:00
rtti_off.prf qmake: enable rtti config option for g++/clang 2018-12-13 20:51:39 +00:00
rtti.prf qmake: enable rtti config option for g++/clang 2018-12-13 20:51:39 +00:00
sanitizer.prf configure: Add sanitizer "fuzzer-no-link" 2019-11-14 15:45:02 +01:00
silent.prf
simd.prf Add new AVX512 extensions found in Intel CLX, ICL and ICX processors 2020-02-03 11:31:49 -07:00
spec_post.prf
spec_pre.prf
static_runtime.prf escape literal backslashes in qmake files 2018-12-12 17:24:39 +00:00
testcase_targets.prf
testcase.prf Android: Fix make check to work for single ABI Qt for Android builds 2020-08-26 01:13:27 +02:00
testcocoon.prf
testlib_defines.prf
toolchain.prf macOS: Don't hard-code x86_64 as the architecture when using qmake 2020-12-07 15:35:55 +01:00
uic.prf Move build tools to libexec instead of the bin dir 2021-02-23 17:02:30 +01:00
use_c_linker.prf
vxworks.prf
warn_off.prf
warn_on.prf
wayland-scanner.prf Move qtwaylandscanner to libexec 2021-05-11 16:39:07 +00:00
xctest.prf
yacc.prf yacc: Output the path for the move with the right directory separator 2020-01-13 11:50:02 +00:00