diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2020-06-22 16:01:20 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2020-06-23 14:01:11 +0200 |
commit | d7efb2a419a88c8f512b98194c8f7bc81dbe942b (patch) | |
tree | 3b6331cd687000e2eb919906b182672a66b86bdc /examples/corelib | |
parent | 7e5a803c08c38e4fddc4338848768b7cfff4848f (diff) | |
download | qtbase-d7efb2a419a88c8f512b98194c8f7bc81dbe942b.tar.gz |
CMake: Fix include paths for AUTOMOC when using frameworks
The qml app was crashing when used by qtdeclarative auto tests. It
complained about unregistered QML types. qmltyperegistrar didn't
create registration info for these types. moc didn't output class info
about these types because the build system didn't provide the proper
include paths.
In qmake land, moc was given 2 sets of paths when building a module:
the non-installed framework dirs as -F flags, and also the
$repo_build_dir/include paths as regular -I flags.
In CMake land we only gave include paths to the non-installed
framework dirs as -I flags, not -F flags.
That's because AUTOMOC checks for a specific pattern in the include
paths to transform them into framework include paths
(existence of Foo.Framework/Headers symlink),
and we didn't pass such an include path.
Make sure to mimic what qmake does, and pass -I flags to
$repo_build_dir/include as public include paths, but only via
BUILD_INTERFACE aka when building Qt itself.
Also pass -F flags by specifying framework include paths in the
pattern that AUTOMOC expects.
Fixes the following qtdeclarative tests
tst_qdebugmessageservice
tst_qqmlinspector
tst_qqmlenginedebuginspectorintegration
tst_qqmlpreview
Task-number: QTBUG-84886
Change-Id: Iab9693d9889bf6d2c40fed067ab9b9da8683a053
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'examples/corelib')
0 files changed, 0 insertions, 0 deletions