Skip to content

AUTOUIC: Fix internal paths of generated ui_foo.h files

Jörg Bornemann requested to merge jobor/cmake:fix-23523 into master

For every file foo.ui we generate a ui_foo.h file in ${target}_autogen/include or {target}_autogen/include_ in the multi-config case. Even .ui files in subdirectories are handled this way. That means, .ui files with the same base name will conflict in a target.

However, for .ui files in subdirectories we added generated sources with the nonexistent path ${target}_autogen/include/subdir/ui_foo.h. This patch fixes that.

Also, CMake will now yield an error if a target has multiple .ui files with the same base name.

Fixes: #23523
Backport: release

Edited by Brad King

Merge request reports