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> |
||
|---|---|---|
| .. | ||
| mockplugins | ||
| test(needsquoting)dirname | ||
| test_QFINDTESTDATA | ||
| test_QTBUG-63422 | ||
| test_QT_TESTCASE_BUILDDIR | ||
| test_add_big_resource | ||
| test_add_binary_resources_delayed_file | ||
| test_add_resource_options | ||
| test_add_resource_prefix | ||
| test_add_resources_big_resources | ||
| test_add_resources_binary_generated | ||
| test_add_resources_delayed_file | ||
| test_android_multi_abi_forward_vars | ||
| test_build_simple_widget_app | ||
| test_concurrent_module | ||
| test_config_expressions | ||
| test_dbus_module | ||
| test_dependent_modules | ||
| test_egl_lib | ||
| test_generating_cpp_exports | ||
| test_global_promotion | ||
| test_import_plugins | ||
| test_interface | ||
| test_interface_link_libraries | ||
| test_json_plugin_includes | ||
| test_moc_macro_target | ||
| test_multiple_find_package | ||
| test_opengl_lib | ||
| test_platform_defs_include | ||
| test_plugin_shared_static_flavor | ||
| test_plugins | ||
| test_private_includes | ||
| test_private_targets | ||
| test_qt_add_resources_rebuild | ||
| test_qt_extract_metatypes | ||
| test_qtmainwin_library | ||
| test_resource_without_obj_lib | ||
| test_static_resources | ||
| test_testlib_definitions | ||
| test_testlib_no_link_gui | ||
| test_testlib_no_link_widgets | ||
| test_umbrella_config | ||
| test_versionless_targets | ||
| test_widgets_app_deployment | ||
| test_wrap_cpp_and_resources | ||
| test_wrap_cpp_moc | ||
| test_wrap_cpp_options | ||
| tst_qaddpreroutine | ||
| CMakeLists.txt | ||
| test_plugin_shared_static_flavor.cmake | ||