Commit Graph

3 Commits

Author SHA1 Message Date
Alexandru Croitor
d962c9ff85 CMake: Make Platform a dependency for all Qt internal targets
In particular that influences BundledLibrary targets.

Most internal targets already depended transitively on Qt::Platform
via Qt::Core as a public dependency. This was not the case for
BundledLibrary targets which don't link to Qt::Core.

This led to compilation issues in user projects when targeting
WebAssembly, due to mismatched flags between a bundled Harfbuzz vs
a user project. Probably other subtle issues as well (e.g. none of the
Windows specific compile definitions were passed to bundled libs).

Bundled libraries depend on PlatformCommonInternal already, so make
PlatformCommonInternal turn depend on the public Platform target.
I thought that was already the case, but we merely relied on the
Qt::Core dependency.

Note that Qt::Core should still list Platform as a public dependency,
so it gets propagated to user projects.

Amends acf9b3a68b

Change-Id: Ida3b219818f89ec6eba2c2d92c5db65ad56bc5a4
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-03-19 12:52:49 +00:00
Giuseppe D'Angelo
8780fbb2eb Build Qt (and client apps using it) with /permissive-
*Not* using /permissive- exposes Qt and client apps to interesting
bugs and/or build failures, (e.g. QTBUG-87225, or
19b5520abf). We demand strict
conformance by any other compiler, it's time to demand it from
MSVC too.

The Windows headers themselves are clean starting from the
Windows Fall Creators SDK (10.0.16299.0), and moreover Qt 6 will
drop WinRT; therefore, the comment in the mkspecs does not apply
any more.

Since /permissive- implies /Zc:referenceBinding, drop that
option. The other implied options are set on MSVC < 2017,
but I leave them in to avoid tinkering with the fragile lists
of C/C++ flags.

Rename the CMake internal helper function to better describe
what it does.

Fixes: QTBUG-85633
Fixes: QTBUG-85637
Fixes: QTBUG-85635
Fixes: QTBUG-88244
Change-Id: Ie03fddb61aa066fdc14b7231c22e7108b4a02fbb
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-11-10 20:01:49 +01:00
Alexandru Croitor
acf9b3a68b CMake: Split QtBaseGlobalTargets.cmake into multiple files
And wrap the various behaviors into separate functions.

Change-Id: If940351af34e445de050f2b46301de7080b1555b
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-10-12 13:36:01 +02:00