summaryrefslogtreecommitdiffstats
path: root/Source/cmQtAutoGenerators.h
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/cmQtAutoGenerators.h
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/cmQtAutoGenerators.h')
-rw-r--r--Source/cmQtAutoGenerators.h27
1 files changed, 24 insertions, 3 deletions
diff --git a/Source/cmQtAutoGenerators.h b/Source/cmQtAutoGenerators.h
index fe38b05..37b6154 100644
--- a/Source/cmQtAutoGenerators.h
+++ b/Source/cmQtAutoGenerators.h
@@ -31,6 +31,7 @@ private:
const std::string &autogenTargetName,
std::map<std::string, std::string> &configIncludes,
std::map<std::string, std::string> &configDefines);
+ void SetupAutoUicTarget(cmTarget* target);
cmGlobalGenerator* CreateGlobalGenerator(cmake* cm,
const char* targetDirectory);
@@ -47,19 +48,30 @@ private:
bool RunAutogen(cmMakefile* makefile);
bool GenerateMoc(const std::string& sourceFile,
const std::string& mocFileName);
+ bool GenerateUi(const std::string& uiFileName);
void ParseCppFile(const std::string& absFilename,
const std::vector<std::string>& headerExtensions,
- std::map<std::string, std::string>& includedMocs);
+ std::map<std::string, std::string>& includedMocs,
+ std::vector<std::string>& includedUis);
void StrictParseCppFile(const std::string& absFilename,
const std::vector<std::string>& headerExtensions,
- std::map<std::string, std::string>& includedMocs);
+ std::map<std::string, std::string>& includedMocs,
+ std::vector<std::string>& includedUis);
void SearchHeadersForCppFile(const std::string& absFilename,
const std::vector<std::string>& headerExtensions,
std::set<std::string>& absHeaders);
void ParseHeaders(const std::set<std::string>& absHeaders,
const std::map<std::string, std::string>& includedMocs,
- std::map<std::string, std::string>& notIncludedMocs);
+ std::map<std::string, std::string>& notIncludedMocs,
+ std::vector<std::string>& includedUis);
+
+ void ParseForUic(const std::string& fileName,
+ const std::string& contentsString,
+ std::vector<std::string>& includedUis);
+
+ void ParseForUic(const std::string& fileName,
+ std::vector<std::string>& includedUis);
void Init();
@@ -68,13 +80,19 @@ private:
bool StartsWith(const std::string& str, const std::string& with);
std::string ReadAll(const std::string& filename);
+ void MergeUicOptions(std::vector<std::string> &opts,
+ const std::vector<std::string> &fileOpts, bool isQt5);
+
std::string QtMajorVersion;
std::string Sources;
+ std::string SkipMoc;
+ std::string SkipUic;
std::string Headers;
bool IncludeProjectDirsBefore;
std::string Srcdir;
std::string Builddir;
std::string MocExecutable;
+ std::string UicExecutable;
std::string MocCompileDefinitionsStr;
std::string MocIncludesStr;
std::string MocOptionsStr;
@@ -89,10 +107,13 @@ private:
std::list<std::string> MocIncludes;
std::list<std::string> MocDefinitions;
std::vector<std::string> MocOptions;
+ std::vector<std::string> UicTargetOptions;
+ std::map<std::string, std::string> UicOptions;
bool Verbose;
bool ColorOutput;
bool RunMocFailed;
+ bool RunUicFailed;
bool GenerateAll;
bool RelaxedMode;