Mercurial > projects > qtd
comparison generator/global.h @ 385:e700fa4916e4
Added missing files
author | Max Samukha <maxter@spambox.com> |
---|---|
date | Fri, 16 Jul 2010 20:11:14 +0300 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
384:d2f48c4cb3e3 | 385:e700fa4916e4 |
---|---|
1 #ifndef GLOBAL_H | |
2 #define GLOBAL_H | |
3 | |
4 #include <QString> | |
5 | |
6 class Global | |
7 { | |
8 public: | |
9 enum TargetPlatform | |
10 { | |
11 UnixTarget, | |
12 Win32Target | |
13 }; | |
14 | |
15 TargetPlatform targetPlatform; | |
16 bool cppShared; | |
17 bool dPhobos; | |
18 int dVersion; | |
19 | |
20 | |
21 void setTargetPlatform(QString tp) | |
22 { | |
23 if (tp == "win32") | |
24 targetPlatform = Win32Target; | |
25 else if (tp == "unix") | |
26 targetPlatform = UnixTarget; | |
27 | |
28 else if (tp.isEmpty()) { | |
29 #if WIN32 | |
30 targetPlatform = Win32Target; | |
31 #else | |
32 targetPlatform = UnixTarget; | |
33 #endif | |
34 } | |
35 else | |
36 qFatal("Target platform %s is not supported", qPrintable(tp)); | |
37 } | |
38 | |
39 Global(); | |
40 | |
41 }; | |
42 | |
43 extern Global global; | |
44 | |
45 #endif // GLOBAL_H |