mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-01 20:00:51 -05: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(),
|
this->LocalGen->GetCurrentSourceDirectory(),
|
||||||
cmSystemTools::GetFilenamePath(fullPath));
|
cmSystemTools::GetFilenamePath(fullPath));
|
||||||
|
|
||||||
|
// Avoid creating a path containing adjacent slashes
|
||||||
|
if (!uiHeaderRelativePath.empty() &&
|
||||||
|
uiHeaderRelativePath.back() != '/') {
|
||||||
|
uiHeaderRelativePath += '/';
|
||||||
|
}
|
||||||
|
|
||||||
auto uiHeaderFilePath = cmStrCat(
|
auto uiHeaderFilePath = cmStrCat(
|
||||||
'/', uiHeaderRelativePath, '/', "ui_"_s,
|
'/', uiHeaderRelativePath, "ui_"_s,
|
||||||
cmSystemTools::GetFilenameWithoutLastExtension(fullPath), ".h"_s);
|
cmSystemTools::GetFilenameWithoutLastExtension(fullPath), ".h"_s);
|
||||||
|
|
||||||
ConfigString uiHeader;
|
ConfigString uiHeader;
|
||||||
|
|||||||
Reference in New Issue
Block a user