diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2002-02-18 22:41:02 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2002-02-18 22:41:02 (GMT) |
commit | 8d8528db822cb567fb5e6782c92d093bc8a80c4a (patch) | |
tree | 48bf39ae78f904f7cdc39396cd39337c2140930a /Source/cmMSDotNETGenerator.h | |
parent | 531900c941c6db57e5a07aebc140bf7d066f120d (diff) | |
download | CMake-8d8528db822cb567fb5e6782c92d093bc8a80c4a.zip CMake-8d8528db822cb567fb5e6782c92d093bc8a80c4a.tar.gz CMake-8d8528db822cb567fb5e6782c92d093bc8a80c4a.tar.bz2 |
getting closer but still not working dot net support
Diffstat (limited to 'Source/cmMSDotNETGenerator.h')
-rw-r--r-- | Source/cmMSDotNETGenerator.h | 99 |
1 files changed, 86 insertions, 13 deletions
diff --git a/Source/cmMSDotNETGenerator.h b/Source/cmMSDotNETGenerator.h index 5a0fb2f..7a9be42 100644 --- a/Source/cmMSDotNETGenerator.h +++ b/Source/cmMSDotNETGenerator.h @@ -19,9 +19,8 @@ #include "cmStandardIncludes.h" #include "cmMakefileGenerator.h" - -class cmVCProjWriter; -class cmSLNWriter; +#include "cmTarget.h" +#include "cmSourceGroup.h" /** \class cmMSDotNETGenerator * \brief Write a Microsoft Visual C++ DSP (project) file. @@ -31,6 +30,8 @@ class cmSLNWriter; class cmMSDotNETGenerator : public cmMakefileGenerator { public: + enum BuildType {STATIC_LIBRARY, DLL, EXECUTABLE, WIN32_EXECUTABLE, UTILITY}; + ///! Constructor sets the generation of SLN files on. cmMSDotNETGenerator(); @@ -61,24 +62,96 @@ public: ///! Turn on the generation of a Microsoft Visual C++ SLN file. void BuildProjOn() {m_BuildSLN = true;} - ///! Retrieve a pointer to a cmSLNWriter instance. - cmSLNWriter* GetSLNWriter() - {return m_SLNWriter;} - - ///! Retrieve a pointer to a cmVCProjWriter instance. - cmVCProjWriter* GetVCProjWriter() - {return m_VCProjWriter;} - /** * Try to determine system infomation such as shared library * extension, pthreads, byte order etc. */ virtual void ComputeSystemInfo(); +protected: + /** + * Specify the type of the build: static, dll, or executable. + */ + void SetBuildType(BuildType,const char *name); + + /** + * Return array of created VCProj names in a STL vector. + * Each executable must have its own dsp. + */ + std::vector<std::string> GetCreatedProjectNames() + { + return m_CreatedProjectNames; + } + + /** + * Return the makefile. + */ + cmMakefile* GetMakefile() + { + return m_Makefile; + } + +private: + void CreateSingleVCProj(const char *lname, cmTarget &tgt); + void WriteVCProjFile(std::ostream& fout, const char *libName, + cmTarget &tgt); + void WriteVCProjBeginGroup(std::ostream& fout, + const char* group, + const char* filter); + void WriteVCProjEndGroup(std::ostream& fout); + + void WriteProjectStart(std::ostream& fout, const char *libName, + const cmTarget &tgt, std::vector<cmSourceGroup> &sgs); + void WriteConfigurations(std::ostream& fout, + const char *libName, + const cmTarget &tgt); + void WriteConfiguration(std::ostream& fout, + const char* configName, + const char* libName, + const cmTarget &tgt); + + void OutputDefineFlags(std::ostream& fout); + void WriteVCProjFooter(std::ostream& fout); + void AddVCProjBuildRule(cmSourceGroup&); + void WriteCustomRule(std::ostream& fout, + const char* source, + const char* command, + const std::set<std::string>& depends, + const std::set<std::string>& outputs); + + std::string CreateTargetRules(const cmTarget &target, + const char *libName); + std::string CombineCommands(const cmSourceGroup::Commands &commands, + cmSourceGroup::CommandFiles &totalCommand, + const char *source); + + + virtual void OutputSLNFile(); + void OutputVCProjFile(); + std::string CreateGUID(const char* project); + void WriteSLNFile(std::ostream& fout); + void WriteSLNHeader(std::ostream& fout); + void WriteProject(std::ostream& fout, + const char* name, const char* path, + cmMSDotNETGenerator* project, const cmTarget &t); + void WriteProjectDepends(std::ostream& fout, + const char* name, const char* path, + cmMSDotNETGenerator* project, const cmTarget &t); + void WriteProjectConfigurations(std::ostream& fout, const char* name); + void WriteExternalProject(std::ostream& fout, + const char* name, const char* path, + const std::vector<std::string>& dependencies); + void WriteSLNFooter(std::ostream& fout); + void OutputBuildTool(std::ostream& fout, const char* libname, const cmTarget& t); private: - cmSLNWriter* m_SLNWriter; - cmVCProjWriter* m_VCProjWriter; + std::map<cmStdString, cmStdString> m_GUIDMap; + BuildType m_BuildType; bool m_BuildSLN; + std::string m_IncludeOptions; + std::vector<std::string> m_Configurations; + std::string m_VCProjHeaderTemplate; + std::string m_VCProjFooterTemplate; + std::vector<std::string> m_CreatedProjectNames; }; |