dbus: Skip AUTOUIC on generated sources

Skip AUTOUIC on sources generated by the qt_add_dbus_interface and
qt_add_dbus_adaptor macros. Otherwise CMake will warn due to policy
CMP0071:

```
  For compatibility, CMake is excluding the GENERATED source file(s):

  (...)

  from processing by AUTOMOC and AUTOUIC. (...)
```

Pick-to: 5.15
Change-Id: I7d14b23c9343940964d5bc0d1d18fc19b41b5cd0
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Kevin Funk 2020-09-21 10:32:19 +02:00
parent 39b1dea2ec
commit e59e924f52

View File

@ -63,7 +63,10 @@ function(qt6_add_dbus_interface _sources _interface _basename)
VERBATIM
)
set_source_files_properties("${_impl}" "${_header}" PROPERTIES SKIP_AUTOMOC TRUE)
set_source_files_properties("${_impl}" "${_header}" PROPERTIES
SKIP_AUTOMOC TRUE
SKIP_AUTOUIC TRUE
)
qt6_generate_moc("${_header}" "${_moc}")
@ -189,7 +192,10 @@ function(qt6_add_dbus_adaptor _sources _xml_file _include) # _optionalParentClas
endif()
qt6_generate_moc("${_header}" "${_moc}")
set_source_files_properties("${_impl}" "${_header}" PROPERTIES SKIP_AUTOMOC TRUE)
set_source_files_properties("${_impl}" "${_header}" PROPERTIES
SKIP_AUTOMOC TRUE
SKIP_AUTOUIC TRUE
)
macro_add_file_dependencies("${_impl}" "${_moc}")
list(APPEND ${_sources} "${_impl}" "${_header}" "${_moc}")