diff options
author | Brad King <brad.king@kitware.com> | 2014-03-26 17:24:43 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2014-03-26 17:24:43 (GMT) |
commit | edb506b8625ac06cd73c0b1b2696ac4bb65d184a (patch) | |
tree | f501643c9aefa3eb58aa050043bcae57679265d6 /Source/cmQtAutoGenerators.cxx | |
parent | 098a39f21c140c69bed26dc6914591c76b69c7e2 (diff) | |
parent | 71a11252e95797113ecb1a969386f496b7d4861b (diff) | |
download | CMake-edb506b8625ac06cd73c0b1b2696ac4bb65d184a.zip CMake-edb506b8625ac06cd73c0b1b2696ac4bb65d184a.tar.gz CMake-edb506b8625ac06cd73c0b1b2696ac4bb65d184a.tar.bz2 |
Merge topic 'fix-Qt-Autogen'
71a11252 QtAutogen: Fix use of multiple ui files in a single target.
261acd91 QtAutogen: Use the basename for resource files.
Diffstat (limited to 'Source/cmQtAutoGenerators.cxx')
-rw-r--r-- | Source/cmQtAutoGenerators.cxx | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index 7b11b61..a6e6af7 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -1791,8 +1791,8 @@ void cmQtAutoGenerators::ParseForUic(const std::string& absFilename, std::string::size_type matchOffset = 0; - const std::string absPath = cmsys::SystemTools::GetFilenamePath( - cmsys::SystemTools::GetRealPath(absFilename.c_str())) + '/'; + const std::string realName = + cmsys::SystemTools::GetRealPath(absFilename.c_str()); matchOffset = 0; if ((strstr(contentsString.c_str(), "ui_") != NULL) @@ -1809,7 +1809,7 @@ void cmQtAutoGenerators::ParseForUic(const std::string& absFilename, // finding the correct header, so we need to remove the ui_ part basename = basename.substr(3); - includedUis[absPath] = basename; + includedUis[realName] = basename; matchOffset += uiIncludeRegExp.end(); } while(uiIncludeRegExp.find(contentsString.c_str() + matchOffset)); @@ -1965,7 +1965,7 @@ bool cmQtAutoGenerators::GenerateMoc(const std::string& sourceFile, return false; } -bool cmQtAutoGenerators::GenerateUi(const std::string& path, +bool cmQtAutoGenerators::GenerateUi(const std::string& realName, const std::string& uiFileName) { if (!cmsys::SystemTools::FileExists(this->Builddir.c_str(), false)) @@ -1973,6 +1973,9 @@ bool cmQtAutoGenerators::GenerateUi(const std::string& path, cmsys::SystemTools::MakeDirectory(this->Builddir.c_str()); } + const std::string path = cmsys::SystemTools::GetFilenamePath( + realName.c_str()) + '/'; + std::string ui_output_file = "ui_" + uiFileName + ".h"; std::string ui_input_file = path + uiFileName + ".ui"; @@ -2079,6 +2082,8 @@ bool cmQtAutoGenerators::GenerateQrc() } } + command.push_back("-name"); + command.push_back(basename); command.push_back("-o"); command.push_back(rcc_output_file); command.push_back(*si); |