qt5base-lts/mkspecs/features/data
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
..
cmake CMake: Put the static dependencies into the relevant configuration 2019-07-05 15:59:13 +02:00
mac macOS: Fix Objective-C namespaceing with Xcode 10 2018-12-03 20:13:13 +00:00
unix findclasslist.pl: namespaces can be exported too 2016-10-13 08:29:02 +00:00
configure.json configure: log -I and -L before doing first library check 2018-11-21 23:07:34 +00:00
dummy.cpp Implement a more direct headersclean check 2015-04-17 00:54:45 +00:00
dumpvcvars.bat qmake: rewrite msvc/nmake cross-build environment setup 2019-01-05 20:33:24 +00:00
macros.cpp qmake: add default path and version detection for ghs toolchain 2018-08-17 15:07:00 +00:00