diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2017-11-18 14:08:08 (GMT) |
---|---|---|
committer | Sebastian Holtermann <sebholt@xwmw.org> | 2017-11-19 11:51:31 (GMT) |
commit | 2a85b5ac768cde4a9bbe98551528c8bae1e268a8 (patch) | |
tree | 2bb1ba0c521f353dd5c2fb1b8fd8a7b9a5c3ba85 /Source/cmQtAutoGeneratorInitializer.h | |
parent | 75819b8626abf0e64895ef19acd27dbd0fa9255b (diff) | |
download | CMake-2a85b5ac768cde4a9bbe98551528c8bae1e268a8.zip CMake-2a85b5ac768cde4a9bbe98551528c8bae1e268a8.tar.gz CMake-2a85b5ac768cde4a9bbe98551528c8bae1e268a8.tar.bz2 |
Autogen: Make cmQtAutoGeneratorInitializer an instantiable class
Remove the cmQtAutoGenDigest classes and make
cmQtAutoGeneratorInitializer instantiable instead.
Diffstat (limited to 'Source/cmQtAutoGeneratorInitializer.h')
-rw-r--r-- | Source/cmQtAutoGeneratorInitializer.h | 76 |
1 files changed, 73 insertions, 3 deletions
diff --git a/Source/cmQtAutoGeneratorInitializer.h b/Source/cmQtAutoGeneratorInitializer.h index b8a5ae4..9eebbd6 100644 --- a/Source/cmQtAutoGeneratorInitializer.h +++ b/Source/cmQtAutoGeneratorInitializer.h @@ -4,9 +4,12 @@ #define cmQtAutoGeneratorInitializer_h #include "cmConfigure.h" // IWYU pragma: keep -#include "cmQtAutoGenDigest.h" +#include "cmQtAutoGen.h" +#include <map> +#include <set> #include <string> +#include <vector> class cmGeneratorTarget; @@ -17,8 +20,75 @@ public: static std::string GetQtMinorVersion(cmGeneratorTarget const* target, std::string const& qtVersionMajor); - static void InitializeAutogenTarget(cmQtAutoGenDigest& digest); - static void SetupAutoGenerateTarget(cmQtAutoGenDigest const& digest); + class Qrc + { + public: + Qrc() + : Generated(false) + , Unique(false) + { + } + + public: + std::string QrcFile; + std::string QrcName; + std::string PathChecksum; + std::string InfoFile; + std::string SettingsFile; + std::string RccFile; + bool Generated; + bool Unique; + std::vector<std::string> Options; + std::vector<std::string> Resources; + }; + +public: + cmQtAutoGeneratorInitializer(cmGeneratorTarget* target, bool mocEnabled, + bool uicEnabled, bool rccEnabled, + std::string const& qtVersionMajor); + + void InitCustomTargets(); + void SetupCustomTargets(); + +private: + void SetupCustomTargetsMoc(); + void SetupCustomTargetsUic(); + + std::vector<std::string> AddGeneratedSource(std::string const& filename, + cmQtAutoGen::Generator genType); + + bool QtVersionGreaterOrEqual(unsigned long requestMajor, + unsigned long requestMinor) const; + +private: + cmGeneratorTarget* Target; + bool MocEnabled; + bool UicEnabled; + bool RccEnabled; + std::string QtVersionMajor; + std::string QtVersionMinor; + // Configurations + std::string ConfigDefault; + std::vector<std::string> ConfigsList; + cmQtAutoGen::MultiConfig MultiConfig; + // Names + std::string AutogenTargetName; + std::string AutogenFolder; + std::string AutogenInfoFile; + std::string AutogenSettingsFile; + // Directories + std::string DirInfo; + std::string DirBuild; + std::string DirWork; + // Sources + std::vector<std::string> Headers; + std::vector<std::string> Sources; + std::set<std::string> MocSkip; + std::set<std::string> UicSkip; + std::map<std::string, std::string> ConfigMocIncludes; + std::map<std::string, std::string> ConfigMocDefines; + std::map<std::string, std::string> ConfigUicOptions; + std::vector<Qrc> Qrcs; }; #endif |