source: trunk/qmake/generators/win32/msvc_vcproj.h

Last change on this file was 2, checked in by dmik, 20 years ago

Imported xplatform parts of the official release 3.3.1 from Trolltech

  • Property svn:keywords set to Id
File size: 3.5 KB
Line 
1
2/****************************************************************************
3** $Id: msvc_vcproj.h 2 2005-11-16 15:49:26Z dmik $
4**
5** Definition of VcprojGenerator class.
6**
7** Copyright (C) 1992-2003 Trolltech AS. All rights reserved.
8**
9** This file is part of qmake.
10**
11** This file may be distributed under the terms of the Q Public License
12** as defined by Trolltech AS of Norway and appearing in the file
13** LICENSE.QPL included in the packaging of this file.
14**
15** This file may be distributed and/or modified under the terms of the
16** GNU General Public License version 2 as published by the Free Software
17** Foundation and appearing in the file LICENSE.GPL included in the
18** packaging of this file.
19**
20** Licensees holding valid Qt Enterprise Edition licenses may use this
21** file in accordance with the Qt Commercial License Agreement provided
22** with the Software.
23**
24** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
25** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
26**
27** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
28** information about Qt Commercial License Agreements.
29** See http://www.trolltech.com/qpl/ for QPL licensing information.
30** See http://www.trolltech.com/gpl/ for GPL licensing information.
31**
32** Contact info@trolltech.com if any conditions of this licensing are
33** not clear to you.
34**
35**********************************************************************/
36
37#ifndef __MSVC_VCPROJ_H__
38#define __MSVC_VCPROJ_H__
39
40#include "winmakefile.h"
41#include "msvc_objectmodel.h"
42
43enum target {
44 Application,
45 SharedLib,
46 StaticLib
47};
48
49struct QUuid;
50class VcprojGenerator : public Win32MakefileGenerator
51{
52 bool init_flag;
53 bool writeVcprojParts(QTextStream &);
54
55 bool writeMakefile(QTextStream &);
56 virtual void writeSubDirs(QTextStream &t);
57 QString findTemplate(QString file);
58 void init();
59
60public:
61 VcprojGenerator(QMakeProject *p);
62 ~VcprojGenerator();
63
64 QString defaultMakefile() const;
65 virtual bool doDepends() const { return FALSE; } //never necesary
66 QString precompH, precompHFilename,
67 precompObj, precompPch;
68 bool usePCH;
69
70protected:
71 virtual bool openOutput(QFile &file) const;
72 virtual void processPrlVariable(const QString &, const QStringList &);
73 virtual bool findLibraries();
74 virtual void outputVariables();
75 QString fixFilename(QString ofile) const;
76
77 void initOld();
78 void initProject();
79 void initConfiguration();
80 void initCompilerTool();
81 void initLinkerTool();
82 void initLibrarianTool();
83 void initIDLTool();
84 void initCustomBuildTool();
85 void initPreBuildEventTools();
86 void initPostBuildEventTools();
87 void initPreLinkEventTools();
88 void initSourceFiles();
89 void initHeaderFiles();
90 void initMOCFiles();
91 void initUICFiles();
92 void initFormsFiles();
93 void initTranslationFiles();
94 void initLexYaccFiles();
95 void initResourceFiles();
96
97 VCProject vcProject;
98 target projectTarget;
99
100private:
101 QUuid getProjectUUID(const QString &filename=QString::null);
102 QUuid increaseUUID(const QUuid &id);
103 friend class VCFilter;
104};
105
106inline VcprojGenerator::~VcprojGenerator()
107{ }
108
109inline QString VcprojGenerator::defaultMakefile() const
110{
111 return project->first("TARGET") + project->first("VCPROJ_EXTENSION");
112}
113
114inline bool VcprojGenerator::findLibraries()
115{
116 return Win32MakefileGenerator::findLibraries("MSVCVCPROJ_LIBS");
117}
118
119#endif /* __MSVC_VCPROJ_H__ */
Note: See TracBrowser for help on using the repository browser.