mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-11 00:11:07 -06:00
Autogen: Fix a bug in setting the UIC source group
If the relative path to a UI file was empty then the source group for the corresponding autogen header file would not apply because of a double slash in the path.
This commit is contained in:
@@ -943,8 +943,14 @@ bool cmQtAutoGenInitializer::InitScanFiles()
|
||||
this->LocalGen->GetCurrentSourceDirectory(),
|
||||
cmSystemTools::GetFilenamePath(fullPath));
|
||||
|
||||
// Avoid creating a path containing adjacent slashes
|
||||
if (!uiHeaderRelativePath.empty() &&
|
||||
uiHeaderRelativePath.back() != '/') {
|
||||
uiHeaderRelativePath += '/';
|
||||
}
|
||||
|
||||
auto uiHeaderFilePath = cmStrCat(
|
||||
'/', uiHeaderRelativePath, '/', "ui_"_s,
|
||||
'/', uiHeaderRelativePath, "ui_"_s,
|
||||
cmSystemTools::GetFilenameWithoutLastExtension(fullPath), ".h"_s);
|
||||
|
||||
ConfigString uiHeader;
|
||||
|
||||
Reference in New Issue
Block a user