view 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
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