source: trunk/qmake/option.h@ 203

Last change on this file since 203 was 8, checked in by dmik, 20 years ago

Transferred Qt for OS/2 version 3.3.1-rc5 sources from the CVS

  • Property svn:keywords set to Id
File size: 4.3 KB
Line 
1/****************************************************************************
2** $Id: option.h 8 2005-11-16 19:36:46Z dmik $
3**
4** Definition of Option class.
5**
6** Copyright (C) 1992-2003 Trolltech AS. All rights reserved.
7**
8** This file is part of qmake.
9**
10** This file may be distributed under the terms of the Q Public License
11** as defined by Trolltech AS of Norway and appearing in the file
12** LICENSE.QPL included in the packaging of this file.
13**
14** This file may be distributed and/or modified under the terms of the
15** GNU General Public License version 2 as published by the Free Software
16** Foundation and appearing in the file LICENSE.GPL included in the
17** packaging of this file.
18**
19** Licensees holding valid Qt Enterprise Edition licenses may use this
20** file in accordance with the Qt Commercial License Agreement provided
21** with the Software.
22**
23** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
24** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
25**
26** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
27** information about Qt Commercial License Agreements.
28** See http://www.trolltech.com/qpl/ for QPL licensing information.
29** See http://www.trolltech.com/gpl/ for GPL licensing information.
30**
31** Contact info@trolltech.com if any conditions of this licensing are
32** not clear to you.
33**
34**********************************************************************/
35
36#ifndef __OPTION_H__
37#define __OPTION_H__
38
39#include "project.h"
40#include <qstring.h>
41#include <qstringlist.h>
42#include <qfile.h>
43
44#define QMAKE_VERSION_MAJOR 1
45#define QMAKE_VERSION_MINOR 7
46#define QMAKE_VERSION_PATCH 0
47const char *qmake_version();
48
49void fixEnvVariables(QString &x);
50void debug_msg(int level, const char *fmt, ...);
51enum QMakeWarn {
52 WarnNone = 0x00,
53 WarnParser = 0x01,
54 WarnLogic = 0x02,
55 WarnAll = 0xFF
56};
57void warn_msg(QMakeWarn t, const char *fmt, ...);
58
59struct Option
60{
61 //simply global convenience
62 static QString libtool_ext;
63 static QString pkgcfg_ext;
64 static QString prf_ext;
65 static QString prl_ext;
66 static QString ui_ext;
67 static QStringList h_ext;
68 static QStringList cpp_ext;
69 static QString h_moc_ext;
70 static QString cpp_moc_ext;
71 static QString obj_ext;
72 static QString lex_ext;
73 static QString yacc_ext;
74 static QString h_moc_mod;
75 static QString cpp_moc_mod;
76 static QString lex_mod;
77 static QString yacc_mod;
78 static QString dir_sep;
79 //both of these must be called..
80 static bool parseCommandLine(int argc, char **argv); //parse cmdline
81 static bool postProcessProject(QMakeProject *);
82
83 //and convenience functions
84 static QString fixPathToLocalOS(const QString& in, bool fix_env=TRUE, bool canonical=TRUE);
85 static QString fixPathToTargetOS(const QString& in, bool fix_env=TRUE, bool canonical=TRUE);
86
87 //global qmake mode, can only be in one mode per invocation!
88 enum QMAKE_MODE { QMAKE_GENERATE_NOTHING, QMAKE_GENERATE_PROJECT, QMAKE_GENERATE_MAKEFILE,
89 QMAKE_GENERATE_PRL, QMAKE_SET_PROPERTY, QMAKE_QUERY_PROPERTY };
90 static QMAKE_MODE qmake_mode;
91
92 //all modes
93 static QFile output;
94 static QString output_dir;
95 static int debug_level;
96 static int warn_level;
97 static QStringList before_user_vars, after_user_vars;
98 enum TARG_MODE { TARG_UNIX_MODE, TARG_WIN_MODE, TARG_MACX_MODE, TARG_MAC9_MODE, TARG_QNX6_MODE, TARG_OS2_MODE };
99 static TARG_MODE target_mode;
100 static QString user_template, user_template_prefix;
101
102
103 //QMAKE_*_PROPERTY options
104 struct prop {
105 static QStringList properties;
106 };
107
108 //QMAKE_GENERATE_PROJECT options
109 struct projfile {
110 static bool do_pwd;
111 static bool do_recursive;
112 static QStringList project_dirs;
113 };
114
115 //QMAKE_GENERATE_MAKEFILE options
116 struct mkfile {
117 static QString qmakespec;
118 static bool do_cache;
119 static bool do_deps;
120 static bool do_mocs;
121 static bool do_dep_heuristics;
122 static bool do_preprocess;
123 static QString cachefile;
124 static int cachefile_depth;
125 static QStringList project_files;
126 static QString qmakespec_commandline;
127 };
128
129private:
130 static int internalParseCommandLine(int, char **, int=0);
131};
132
133
134#endif /* __OPTION_H__ */
Note: See TracBrowser for help on using the repository browser.