packaging: Initial packaging
[platform/upstream/cmake.git] / Source / cmGlobalVisualStudio8Generator.h
1 /*============================================================================
2   CMake - Cross Platform Makefile Generator
3   Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
4
5   Distributed under the OSI-approved BSD License (the "License");
6   see accompanying file Copyright.txt for details.
7
8   This software is distributed WITHOUT ANY WARRANTY; without even the
9   implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10   See the License for more information.
11 ============================================================================*/
12 #ifndef cmGlobalVisualStudio8Generator_h
13 #define cmGlobalVisualStudio8Generator_h
14
15 #include "cmGlobalVisualStudio71Generator.h"
16
17
18 /** \class cmGlobalVisualStudio8Generator
19  * \brief Write a Unix makefiles.
20  *
21  * cmGlobalVisualStudio8Generator manages UNIX build process for a tree
22  */
23 class cmGlobalVisualStudio8Generator : public cmGlobalVisualStudio71Generator
24 {
25 public:
26   cmGlobalVisualStudio8Generator(const char* name,
27     const char* platformName, const char* additionalPlatformDefinition);
28   static cmGlobalGeneratorFactory* NewFactory();
29
30   ///! Get the name for the generator.
31   virtual const char* GetName() const {return this->Name.c_str();}
32
33   /** Get the documentation entry for this generator.  */
34   static void GetDocumentation(cmDocumentationEntry& entry);
35
36   ///! Create a local generator appropriate to this Global Generator
37   virtual cmLocalGenerator *CreateLocalGenerator();
38
39   virtual void AddPlatformDefinitions(cmMakefile* mf);
40
41   /**
42    * Override Configure and Generate to add the build-system check
43    * target.
44    */
45   virtual void Configure();
46   virtual void Generate();
47
48   /**
49    * Where does this version of Visual Studio look for macros for the
50    * current user? Returns the empty string if this version of Visual
51    * Studio does not implement support for VB macros.
52    */
53   virtual std::string GetUserMacrosDirectory();
54
55   /**
56    * What is the reg key path to "vsmacros" for this version of Visual
57    * Studio?
58    */
59   virtual std::string GetUserMacrosRegKeyBase();
60
61   /** Return true if the target project file should have the option
62       LinkLibraryDependencies and link to .sln dependencies. */
63   virtual bool NeedLinkLibraryDependencies(cmTarget& target);
64
65   /** Return true if building for Windows CE */
66   virtual bool TargetsWindowsCE() const {
67     return !this->WindowsCEVersion.empty(); }
68
69 protected:
70   virtual const char* GetIDEVersion() { return "8.0"; }
71
72   virtual bool VSLinksDependencies() const { return false; }
73
74   void AddCheckTarget();
75
76   static cmIDEFlagTable const* GetExtraFlagTableVS8();
77   virtual void WriteSLNHeader(std::ostream& fout);
78   virtual void WriteSolutionConfigurations(std::ostream& fout);
79   virtual void WriteProjectConfigurations(
80     std::ostream& fout, const char* name, cmTarget::TargetType type,
81     const std::set<std::string>& configsPartOfDefaultBuild,
82     const char* platformMapping = NULL);
83   virtual bool ComputeTargetDepends();
84   virtual void WriteProjectDepends(std::ostream& fout, const char* name,
85                                    const char* path, cmTarget &t);
86
87   std::string Name;
88   std::string WindowsCEVersion;
89
90 private:
91   class Factory;
92   friend class Factory;
93 };
94 #endif