qt5base-lts/mkspecs/features
Alexandru Croitor 44602224bf CMake: Put the static dependencies into the relevant configuration
When adding the static dependencies for a module, they should be
added to the debug|release configuration as appropriate, otherwise
it ends up adding the debug version of the libraries to the release
configuration as well as the release version of the libraries.

Implementation wise, that means we have to use generator expressions
of the form $<$<CONFIG:Configuration>:${dependencies}>, because
INTERFACE_LINK_LIBRARIES does not have a
INTERFACE_LINK_LIBRARIES_<CONFIG> equivalent that can be set per
configuration.

Note that the condition part of the generator expression can not
explicitly check for Debug or for Release, because a user can
configure their application without specifying CMAKE_BUILD_TYPE,
which means that both Debug and Relase conditions would fail.
So the actual condition has to be isDebug or isNotDebug.

The same approach is used for INTERFACE_LINK_OPTIONS.

For debug_and_release builds we use the isDebug and isNotDebug
conditions for the generator expressions.

For singular builds (only release or only debug), we set the
generator expression condition to "1" aka always true.
This means that the Qt libraries and link options will always be used
regardless of the configuration with which the CMake application
is configured with.

Fixes: QTBUG-76337
Task-number: QTBUG-38913
Change-Id: I5369d8ba083359a4a92253dbd1dabe9d1efa34db
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2019-07-05 15:59:13 +02:00
..
android Merge remote-tracking branch 'origin/5.12' into 5.13 2019-06-29 01:00:34 +02:00
data CMake: Put the static dependencies into the relevant configuration 2019-07-05 15:59:13 +02:00
mac Fix determination of OpenGL include paths on macOS, take 3 2019-04-27 07:32:53 +00:00
uikit Remove codepaths and checks for unsupported Apple platforms 2018-08-31 12:35:45 +00:00
unix macOS: Don't try to install lldb debug script unless the module provides one 2018-07-20 06:40:05 +00:00
wasm WASM: Make wasm_shell.html compatible with CMake configure_file 2019-05-21 09:12:07 +02:00
win32 Merge remote-tracking branch 'origin/5.12' into 5.13 2019-07-03 15:19:26 +02:00
winrt Merge remote-tracking branch 'origin/5.12' into dev 2018-11-27 01:00:36 +01:00
benchmark.prf mkspecs: Add a benchmark "feature". 2016-03-02 21:24:54 +00:00
build_pass.prf Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
cmake_functions.prf Remove leading '/' from target paths. 2013-11-27 08:24:50 +01: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 make handling of built-in configure options data-driven 2016-12-13 18:55:28 +00:00
coverage.prf configure: Add switch for adding coverage info 2018-10-31 15:08:59 +00:00
create_cmake.prf CMake: Put the static dependencies into the relevant configuration 2019-07-05 15:59:13 +02:00
ctest_testcase_common.prf ctest: Make cmake test pass if it has been run before 2018-11-30 11:30:13 +00:00
ctest_testcase_installed.prf Only run the cmake test in the install location if not already done. 2013-07-15 21:56:51 +02:00
ctest_testcase.prf Always use forward slashes in paths passed to cmake. 2013-07-10 13:05:01 +02:00
dbusadaptors.prf de-duplicate dbusadaptors.prf vs. dbusinterfaces.prf 2012-08-04 00:52:38 +02:00
dbuscommon.pri don't override user-provided dependencies for our extra compilers 2016-06-23 13:25:22 +00:00
dbusinterfaces.prf de-duplicate dbusadaptors.prf vs. dbusinterfaces.prf 2012-08-04 00:52:38 +02:00
declarative_debug.prf Rename quick1_debug back to declarative_debug 2012-10-04 03:03:00 +02:00
default_post.prf Add the c++latest CONFIG value to select the latest C++ standard 2019-05-14 08:01:40 +00:00
default_pre.prf qmake: skip license check while building qt 2018-07-20 18:07:48 +00:00
designer_defines.prf dispose of library-bound feature files 2012-06-19 16:39:52 +02:00
device_config.prf nuke configure -host-option 2016-12-13 18:55:59 +00:00
egl.prf qmake: make CONFIG+=egl work again 2019-01-07 19:07:02 +00:00
exceptions_off.prf turn off exceptions by default where they aren't required 2012-05-17 05:14:26 +02:00
exceptions.prf turn off exceptions by default where they aren't required 2012-05-17 05:14:26 +02:00
exclusive_builds_post.prf Rewrite qmake's exclusive-build feature 2013-10-25 20:50:51 +02:00
exclusive_builds.prf qmake: Add support for running lrelease 2018-07-28 14:43:28 +00: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 Distinguish between Objective-C and Objective-C++ sources 2015-10-09 15:15:17 +00:00
include_source_dir.prf Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
incredibuild_xge.prf untangle use of system vs. shell path(-list) semantics 2014-04-30 16:56:54 +02:00
java.prf Android: remove support for local/debug deployment 2017-09-06 18:21:02 +00:00
lex.prf Fix building when lex source refers to a file generated by yacc 2016-11-01 04:41:21 +00:00
link_ltcg.prf Support different job counts also for ICC LTO 2017-04-07 17:45:04 +00:00
link_pkgconfig.prf make the pkg-config error message more precise 2014-01-07 19:45:15 +01:00
lrelease.prf qmake: Add support for running lrelease 2018-07-28 14:43:28 +00:00
ltcg.prf Add qmake config for controlling LTCG behavior for static libs 2019-06-17 15:27:51 +00:00
moc.prf escape literal backslashes in qmake files 2018-12-12 17:24:39 +00:00
no_debug_info.prf qmake: Remove Windows CE support. 2016-03-10 13:33:44 +00:00
plugin_bundle.prf Ensure that CONFIG += plugin_bundle will create Mach-O bundles on OSX/iOS 2015-05-24 11:46:14 +00:00
precompile_header.prf Fix build with precompile headers 2014-01-14 10:38:29 +01:00
qgltf.prf don't override user-provided dependencies for our extra compilers 2016-06-23 13:25:22 +00:00
qlalr.prf fix qlalr invocation in silent builds 2016-12-07 06:54:33 +00:00
qmake_use.prf configure: normalize dashes to underscores in exported libraries 2018-12-19 19:21:49 +00:00
qml_debug.prf Rename the 'declarative debug support' to 'qml debug support' 2012-03-31 16:33:04 +02:00
qml_module.prf Copy plugins.qmltypes files to build dir (again) 2019-05-15 11:01:50 +00:00
qml_plugin.prf Allow QML plugin to specify import name explicitly 2019-02-26 07:32:22 +00:00
qmltestcase.prf qmltestcase: Fix generation of Visual Studio project files 2019-01-11 12:56:14 +00:00
qt_android_deps.prf make use of silent error() emission 2016-08-08 09:48:41 +00:00
qt_app.prf Make the use of -fdata-sections and --gc-sections more generic in Qt 2018-04-27 06:47:35 +00:00
qt_build_config.prf Fix prefix_build check for top-level builds 2019-06-05 13:02:22 +02:00
qt_build_extra.prf Merge remote-tracking branch 'origin/5.7' into 5.8 2016-08-29 15:30:17 +02:00
qt_build_paths.prf syncqt: fix forwarding injected headers, take ~3 2018-09-12 06:53:02 +00:00
qt_clear_installs.prf disable install targets for non-prefix builds 2016-01-12 15:16:37 +00:00
qt_common.prf Fix QMAKE_PRL_INSTALL_REPLACE for macOS 2019-05-23 07:31:26 +00:00
qt_config.prf stop exporting QT.*.{libexecs,plugins,imports,qml} in module pris 2017-02-06 16:33:25 +00:00
qt_configure.prf Merge remote-tracking branch 'origin/5.12' into 5.13 2019-06-07 13:19:27 +02:00
qt_docs_targets.prf generalize references to exclusive builds 2016-07-13 14:27:07 +00:00
qt_docs.prf escape literal backslashes in qmake files 2018-12-12 17:24:39 +00:00
qt_example_installs.prf fix installation of resources for example sources 2018-02-21 16:32:49 +00:00
qt_functions.prf Qmake: Introduce and use QMAKE_{SYSTEM,SHELL}_NULL_DEVICE variable, take 2 2017-10-13 13:32:36 +00:00
qt_helper_lib.prf configure: normalize dashes to underscores in exported libraries 2018-12-19 19:21:49 +00:00
qt_installs.prf Fix install targets for generated private headers 2019-02-06 07:17:46 +00:00
qt_module_headers.prf Don't hardcode compiler when building headers 2019-06-13 14:11:50 +02:00
qt_module_pris.prf Resolve QMAKE_INCDIR_VULKAN on every qmake call 2019-05-05 13:15:37 +00:00
qt_module.prf Fix .la/.pc replacements if libdir is in QMAKE_DEFAULT_LIBDIRS 2019-06-25 09:17:07 +02:00
qt_parts.prf nuke {tests,examples}_need_tools flags 2018-05-30 10:57:45 +00:00
qt_plugin.prf Make sure MODULE is set even when we are not creating a pri file 2018-06-11 14:52:12 +00:00
qt_prefix_build_check.prf Fix prefix_build check for top-level builds 2019-06-05 13:02:22 +02:00
qt_targets.prf Bump copyright year to 2019 2018-12-18 07:51:10 +00:00
qt_test_helper.prf Add cmdline feature to qmake 2019-02-18 07:12:14 +00:00
qt_tool.prf Windows: Automatically set metadata for all Qt apps 2017-07-31 06:19:06 +00:00
qt_tracepoints.prf Support for LTTNG and ETW tracing 2018-01-28 19:17:02 +00:00
qt.prf Merge remote-tracking branch 'origin/5.12' into 5.13 2019-04-16 09:34:50 +02:00
resolve_config.prf Use qtConfig throughout in qtbase 2016-08-19 04:28:05 +00:00
resolve_target.prf Merge remote-tracking branch 'origin/5.8' into dev 2017-01-25 20:06:06 +01:00
resources.prf Replace instances of - with _ when generating the function name 2019-03-19 13:35:15 +00: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 Add support for gcc/clang's sanitize features 2014-10-02 19:45:00 +02:00
silent.prf Fix CONFIG+=silent for MSVC non-inference rules 2017-07-14 18:49:56 +00:00
simd.prf SIMD: Add a haswell sub-architecture selection to our support 2018-07-09 00:18:24 +00:00
spec_post.prf Qmake: Introduce and use QMAKE_{SYSTEM,SHELL}_NULL_DEVICE variable, take 2 2017-10-13 13:32:36 +00:00
spec_pre.prf factor out QMAKE_USE* processing to a separate prf file 2016-10-04 20:20:06 +00:00
static_runtime.prf escape literal backslashes in qmake files 2018-12-12 17:24:39 +00:00
testcase_targets.prf mkspecs: Add a benchmark "feature". 2016-03-02 21:24:54 +00:00
testcase.prf macOS: Use tool environment to ensure tests load matching Qt libraries 2019-01-12 12:18:36 +00:00
testcocoon.prf fix host vs. makefile directory separator mess 2012-07-28 00:09:45 +02:00
testlib_defines.prf Fixed compilation of auto tests using vc(x)proj files 2015-05-22 14:13:00 +00:00
toolchain.prf qmake: Always split QMAKE_DEFAULT_LIBDIRS using ; with clang on windows 2019-04-25 09:29:23 +00:00
uic.prf qmake: add line-based mode for .depend_commands 2018-07-23 17:39:21 +00:00
use_c_linker.prf Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
vxworks.prf Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
warn_off.prf Distinguish between Objective-C and Objective-C++ sources 2015-10-09 15:15:17 +00:00
warn_on.prf Distinguish between Objective-C and Objective-C++ sources 2015-10-09 15:15:17 +00:00
wayland-scanner.prf waylandscanner: use --include-core-only 2018-10-05 08:15:38 +00:00
xctest.prf Allow using Xcode Command Line Tools to build Qt 2017-06-29 02:00:12 +00:00
yacc.prf Merge remote-tracking branch 'origin/5.6' into 5.7 2016-11-04 11:39:15 +01:00