diff options
Diffstat (limited to 'share/qtcreator/templates/wizards/projects/cpplibrary/lib_global.h')
-rw-r--r-- | share/qtcreator/templates/wizards/projects/cpplibrary/lib_global.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/share/qtcreator/templates/wizards/projects/cpplibrary/lib_global.h b/share/qtcreator/templates/wizards/projects/cpplibrary/lib_global.h new file mode 100644 index 0000000000..d6d65c377d --- /dev/null +++ b/share/qtcreator/templates/wizards/projects/cpplibrary/lib_global.h @@ -0,0 +1,29 @@ +%{Cpp:LicenseTemplate}\ +@if '%{Cpp:PragmaOnce}' +#pragma once +@else +#ifndef %{GLOBAL_GUARD} +#define %{GLOBAL_GUARD} +@endif + +@if '%{QtModule}' != 'none' +#include <QtCore/qglobal.h> +@else +#if defined(_MSC_VER) || defined(WIN64) || defined(_WIN64) || defined(__WIN64__) || defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__) +# define Q_DECL_EXPORT __declspec(dllexport) +# define Q_DECL_IMPORT __declspec(dllimport) +#else +# define Q_DECL_EXPORT __attribute__((visibility("default"))) +# define Q_DECL_IMPORT __attribute__((visibility("default"))) +#endif +@endif + +#if defined(%{LibraryDefine}) +# define %{LibraryExport} Q_DECL_EXPORT +#else +# define %{LibraryExport} Q_DECL_IMPORT +#endif + +@if ! '%{Cpp:PragmaOnce}' +#endif // %{GLOBAL_GUARD} +@endif |