Mercurial > projects > qtd
view generator/global.h @ 399:e40f33cc0bf5
Explicitly include qglobal.h before all the ?master includes?.
This makes sure that macros like Q_CORE_EXPORT are already defined for all parsed header files.
Starting with this commit, QtD should build successfully against the pre-built Cocoa packages on OS X 10.6.
author | David Nadlinger <code@klickverbot.at> |
---|---|
date | Sun, 16 Jan 2011 00:56:21 +0100 |
parents | e700fa4916e4 |
children |
line wrap: on
line source
#ifndef GLOBAL_H #define GLOBAL_H #include <QString> class Global { public: enum TargetPlatform { UnixTarget, Win32Target }; TargetPlatform targetPlatform; bool cppShared; bool dPhobos; int dVersion; void setTargetPlatform(QString tp) { if (tp == "win32") targetPlatform = Win32Target; else if (tp == "unix") targetPlatform = UnixTarget; else if (tp.isEmpty()) { #if WIN32 targetPlatform = Win32Target; #else targetPlatform = UnixTarget; #endif } else qFatal("Target platform %s is not supported", qPrintable(tp)); } Global(); }; extern Global global; #endif // GLOBAL_H