diff options
Diffstat (limited to 'Source/cmNinjaTargetGenerator.h')
-rw-r--r-- | Source/cmNinjaTargetGenerator.h | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/Source/cmNinjaTargetGenerator.h b/Source/cmNinjaTargetGenerator.h index b64ce1e..cf06bfd 100644 --- a/Source/cmNinjaTargetGenerator.h +++ b/Source/cmNinjaTargetGenerator.h @@ -16,6 +16,7 @@ #include "cmStandardIncludes.h" #include "cmNinjaTypes.h" #include "cmLocalNinjaGenerator.h" +#include "cmOSXBundleGenerator.h" class cmTarget; class cmGlobalNinjaGenerator; @@ -39,16 +40,21 @@ public: virtual void Generate() = 0; - std::string GetTargetPDB() const; std::string GetTargetName() const; protected: + + bool SetMsvcTargetPdbVariable(cmNinjaVars&) const; + cmGeneratedFileStream& GetBuildFileStream() const; cmGeneratedFileStream& GetRulesFileStream() const; cmTarget* GetTarget() const { return this->Target; } + cmGeneratorTarget* GetGeneratorTarget() const + { return this->GeneratorTarget; } + cmLocalNinjaGenerator* GetLocalGenerator() const { return this->LocalGenerator; } @@ -111,6 +117,30 @@ protected: // Helper to add flag for windows .def file. void AddModuleDefinitionFlag(std::string& flags); + void EnsureDirectoryExists(const std::string& dir) const; + void EnsureParentDirectoryExists(const std::string& path) const; + + // write rules for Mac OS X Application Bundle content. + struct MacOSXContentGeneratorType : + cmOSXBundleGenerator::MacOSXContentGeneratorType + { + MacOSXContentGeneratorType(cmNinjaTargetGenerator* g) : + Generator(g) {} + + void operator()(cmSourceFile& source, const char* pkgloc); + + private: + cmNinjaTargetGenerator* Generator; + }; + friend struct MacOSXContentGeneratorType; + +protected: + MacOSXContentGeneratorType* MacOSXContentGenerator; + // Properly initialized by sub-classes. + cmOSXBundleGenerator* OSXBundleGenerator; + std::set<cmStdString> MacContentFolders; + + private: cmTarget* Target; cmGeneratorTarget* GeneratorTarget; |