diff options
author | Orkun Tokdemir <orkun.tokdemir@qt.io> | 2023-07-21 16:41:48 +0200 |
---|---|---|
committer | Orkun Tokdemir <orkun.tokdemir@qt.io> | 2024-01-19 16:16:51 +0100 |
commit | dc4159286b8571a3f3543e457fe1b51b9f5965b7 (patch) | |
tree | 695e999bbda78b6e85cccaa7e8ad7b2fae738682 /tests/auto/cmake/CMakeLists.txt | |
parent | bcdd51cfae24731a73d008add23d3c1e85bbd8d0 (diff) |
qt6_wrap_cpp: Add .moc generation
When a `.moc` file is included in a source file and that source passed
to `qt_wrap_cpp`, Users should add the generated `.moc`s path to the
target's include path. Since we don't share anything about the output
path of generated files by `qt_wrap_cpp`, it makes sense to add in
inside `qt_wrap_cpp`. And also, the generated `.moc` file is added
to target's source to complete the dependency graph. Otherwise, Users
need to get output variable and pass it to target's sources.
* Update docs
* Add test
[ChangeLog][Build System] qt_wrap_cpp will accept .cpp files from now
on. When .cpp a file is passed to qt_wrap_cpp, TARGET parameter
becomes required. Generated .moc files are added to target's sources
inside qt_wrap_cpp. That's why the output parameter will not contain
generated .moc files.
Fixes: QTBUG-113402
Change-Id: I54dd2b1ff8e5c9ba457b1eb4f73b0a8190d9c659
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'tests/auto/cmake/CMakeLists.txt')
-rw-r--r-- | tests/auto/cmake/CMakeLists.txt | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/auto/cmake/CMakeLists.txt b/tests/auto/cmake/CMakeLists.txt index 3fe358cd0b..b8d8f50d6b 100644 --- a/tests/auto/cmake/CMakeLists.txt +++ b/tests/auto/cmake/CMakeLists.txt @@ -197,6 +197,7 @@ endif() _qt_internal_test_expect_pass(test_add_resource_prefix BINARY test_add_resource_prefix) _qt_internal_test_expect_build_fail(test_add_resource_options) _qt_internal_test_expect_build_fail(test_wrap_cpp_options) +_qt_internal_test_expect_pass(test_wrap_cpp_moc) _qt_internal_test_expect_pass(test_platform_defs_include) _qt_internal_test_expect_pass(test_qtmainwin_library) |