00001 #ifndef GLOBAL_H 00002 #define GLOBAL_H 00003 00004 #include <QtGlobal> 00005 00006 #define GCC_VERSION (__GNUC__ * 100 \ 00007 + __GNUC_MINOR__ * 10 \ 00008 + __GNUC_PATCHLEVEL) 00009 00010 #if defined (Q_CC_MSVC) || defined (Q_OS_WIN32) 00011 #define EXPORT_DECL __declspec(dllexport) 00012 #define IMPORT_DECL __declspec(dllimport) 00013 #elif GCC_VERSION >= 400 00014 #define EXPORT_DECL __attribute__((visibility("default"))) 00015 #define IMPORT_DECL 00016 #else 00017 #define EXPORT_DECL 00018 #define IMPORT_DECL 00019 #endif 00020 00021 #ifdef TOOLS_MAKEDLL 00022 #define TOOLS_EXPORT EXPORT_DECL 00023 #else 00024 #define TOOLS_EXPORT IMPORT_DECL 00025 #endif 00026 00027 #ifdef DOMAIN_MAKEDLL 00028 #define DOMAIN_EXPORT EXPORT_DECL 00029 #else 00030 #define DOMAIN_EXPORT IMPORT_DECL 00031 #endif 00032 00033 #ifdef CONTROL_MAKEDLL 00034 #define CONTROL_EXPORT EXPORT_DECL 00035 #else 00036 #define CONTROL_EXPORT IMPORT_DECL 00037 #endif 00038 00039 #ifdef GUI_MAKEDLL 00040 #define GUI_EXPORT EXPORT_DECL 00041 #else 00042 #define GUI_EXPORT IMPORT_DECL 00043 #endif 00044 00045 #ifdef UI_MAKEDLL 00046 #define UI_EXPORT EXPORT_DECL 00047 #else 00048 #define UI_EXPORT IMPORT_DECL 00049 #endif 00050 00051 #include <QCoreApplication> 00052 #define PLUGINS_PATH QCoreApplication::instance()->applicationDirPath() + "/../lib" 00053 00054 #endif //GLOBAL_H