summaryrefslogtreecommitdiffstats
path: root/cmake/modulecppexports.h.in
blob: a2c2155720fff7a4980620830cbde41e6a8a409d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only

#ifndef @header_base_name_upper@_H
#define @header_base_name_upper@_H

#include <QtCore/qglobal.h>

#if defined(QT_SHARED) || !defined(QT_STATIC)
#  if defined(QT_BUILD_@module_define_infix@_LIB)
#    define Q_@module_define_infix@_EXPORT Q_DECL_EXPORT
#  else
#    define Q_@module_define_infix@_EXPORT Q_DECL_IMPORT
#  endif
#else
#  define Q_@module_define_infix@_EXPORT
#endif

#if !defined(QT_BUILD_@module_define_infix@_LIB) || defined(QT_STATIC)
/* outside library → inline decl + defi */
#  define QT_@module_define_infix@_INLINE_SINCE(major, minor) inline
#  define QT_@module_define_infix@_INLINE_IMPL_SINCE(major, minor) 1
#elif defined(QT_@module_define_infix@_BUILD_REMOVED_API)
/* inside library, inside removed_api.cpp → non-inline decl, defi */
#  define QT_@module_define_infix@_INLINE_SINCE(major, minor) /* not inline */
#  define QT_@module_define_infix@_INLINE_IMPL_SINCE(major, minor) 1
#else
/* inside library, outside removed_api.cpp → non-inline decl, no defi */
#  define QT_@module_define_infix@_INLINE_SINCE(major, minor) /* not inline */
#  define QT_@module_define_infix@_INLINE_IMPL_SINCE(major, minor) 0
#endif

#ifdef QT_@module_define_infix@_BUILD_REMOVED_API
#  define QT_@module_define_infix@_REMOVED_SINCE(major, minor) QT_DEPRECATED_SINCE(major, minor)
#else
#  define QT_@module_define_infix@_REMOVED_SINCE(major, minor) 0
#endif

#endif // @header_base_name_upper@_H