diff options
author | Stanislav Ionascu <stanislav.ionascu@gmail.com> | 2015-02-08 12:50:16 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-03-20 14:25:11 (GMT) |
commit | f85db2f32358e6de921aba7d1cb8ecb81da934c0 (patch) | |
tree | 2f4944d47d14c8b11b58ca7dbd0e7664fb3c22c6 /Source/cmExtraQbsGenerator.h | |
parent | 380db3de00bd74f01781ea93e9ba9cebdea000cc (diff) | |
download | CMake-f85db2f32358e6de921aba7d1cb8ecb81da934c0.zip CMake-f85db2f32358e6de921aba7d1cb8ecb81da934c0.tar.gz CMake-f85db2f32358e6de921aba7d1cb8ecb81da934c0.tar.bz2 |
Qbs: Add new 'extra' generator for qbs project files
Diffstat (limited to 'Source/cmExtraQbsGenerator.h')
-rw-r--r-- | Source/cmExtraQbsGenerator.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/Source/cmExtraQbsGenerator.h b/Source/cmExtraQbsGenerator.h new file mode 100644 index 0000000..531ccc9 --- /dev/null +++ b/Source/cmExtraQbsGenerator.h @@ -0,0 +1,48 @@ +#ifndef CMEXTRAQBSGENERATOR_H +#define CMEXTRAQBSGENERATOR_H + +#include "cmExternalMakefileProjectGenerator.h" + +class cmGeneratorTarget; + +class cmExtraQbsGenerator : public cmExternalMakefileProjectGenerator +{ +public: + cmExtraQbsGenerator(); + ~cmExtraQbsGenerator(); + + virtual std::string GetName() const + { return cmExtraQbsGenerator::GetActualName(); } + static std::string GetActualName() { return "Qbs"; } + static cmExternalMakefileProjectGenerator *New() + { return new cmExtraQbsGenerator; } + + /** Get the documentation entry for this generator. */ + virtual void GetDocumentation(cmDocumentationEntry &entry, + const std::string &fullName) const; + + virtual void Generate(); + +private: + void CreateProjectFile(const std::string &name, + const std::vector<cmLocalGenerator *> &lgs); + void CreateNewProjectFile(const std::string &projectName, + const std::vector<cmLocalGenerator *> &lgs, + const std::string &filename); + void AppendSubProject(cmGeneratedFileStream &fout, cmLocalGenerator *lg); + void AppendProduct(cmGeneratedFileStream &fout, cmLocalGenerator *lg); + void AppendTarget(cmGeneratedFileStream &fout, + cmLocalGenerator *lg, + const cmTarget &t, + const std::string &cfg); + void AppendSources(cmGeneratedFileStream &fout, + cmGeneratorTarget *gt, + const cmTarget &t, + const std::string &cfg); + void AppendIncludePaths(cmGeneratedFileStream &fout, + const std::set<std::string> &paths); + void AppendCompileDefinitions(cmGeneratedFileStream &fout, + const std::set<std::string> &defs); +}; + +#endif // CMEXTRAQBSGENERATOR_H |