diff options
author | Stephen Kelly <steveire@gmail.com> | 2013-07-25 09:24:53 +0200 |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2013-10-24 12:30:38 +0200 |
commit | 84218e1870ab075c9e2be1f2947358702c849fed (patch) | |
tree | bf9c4c40c03ef8d5e07340457969b5181b7ef458 /Source/cmSourceFile.cxx | |
parent | 94a0ca604ca6ba3699b6d309938e881b2a3984a0 (diff) | |
download | cmake-84218e1870ab075c9e2be1f2947358702c849fed.tar.gz |
Add automatic uic invocation for Qt.
The source files are already processed by cmQtAutomoc to look for
moc includes, so extend that to also look for ui_ includes and
find corresponding .ui files to process.
This replaces the need to invoke qt4_wrap_ui().
As the ui files are not likely to be part of the SOURCES of the
target, store the options associated with them separately in the
cmMakefile for querying during the autogen run.
Diffstat (limited to 'Source/cmSourceFile.cxx')
-rw-r--r-- | Source/cmSourceFile.cxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/cmSourceFile.cxx b/Source/cmSourceFile.cxx index d747309cd7..ec98c2c2c3 100644 --- a/Source/cmSourceFile.cxx +++ b/Source/cmSourceFile.cxx @@ -287,6 +287,17 @@ void cmSourceFile::SetProperty(const char* prop, const char* value) } this->Properties.SetProperty(prop, value, cmProperty::SOURCE_FILE); + + std::string ext = + cmSystemTools::GetFilenameLastExtension(this->Location.GetName()); + if (ext == ".ui") + { + cmMakefile* mf = this->Location.GetMakefile(); + if (strcmp(prop, "AUTOUIC_OPTIONS") == 0) + { + mf->AddQtUiFileWithOptions(this); + } + } } //---------------------------------------------------------------------------- |