summaryrefslogtreecommitdiffstats
path: root/Source/cmSourceFile.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-07-25 07:24:53 (GMT)
committerStephen Kelly <steveire@gmail.com>2013-10-24 10:30:38 (GMT)
commit84218e1870ab075c9e2be1f2947358702c849fed (patch)
treebf9c4c40c03ef8d5e07340457969b5181b7ef458 /Source/cmSourceFile.cxx
parent94a0ca604ca6ba3699b6d309938e881b2a3984a0 (diff)
downloadCMake-84218e1870ab075c9e2be1f2947358702c849fed.zip
CMake-84218e1870ab075c9e2be1f2947358702c849fed.tar.gz
CMake-84218e1870ab075c9e2be1f2947358702c849fed.tar.bz2
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.cxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/cmSourceFile.cxx b/Source/cmSourceFile.cxx
index d747309..ec98c2c 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);
+ }
+ }
}
//----------------------------------------------------------------------------