summaryrefslogtreecommitdiff
path: root/libcmark-gfm-extensions/libcmark-gfm-extensions/cmark-gfm-extensions_export.h
blob: db966d54229acf9638714eb5c57f558ae53db821 (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
40
41
42
43
44
45
46
47
48
/* file      : libcmark-gfm-extensions/cmark-gfm-extensions_export.h -*- C -*-
 * copyright : Copyright (c) 2016-2019 Code Synthesis Ltd
 * license   : FreeBSD License; see accompanying COPYING file
 */

#ifndef CMARK_GFM_EXTENSIONS_EXPORT_H
#define CMARK_GFM_EXTENSIONS_EXPORT_H

/*
 * The upstream's version of this file is auto-generated by cmake. We implement
 * it from scratch (see cmark-gfm_export.h for details).
 */
#if defined(CMARK_GFM_EXTENSIONS_STATIC)         // Using static.
#  define CMARK_GFM_EXTENSIONS_EXPORT
#elif defined(CMARK_GFM_EXTENSIONS_STATIC_BUILD) // Building static.
#  define CMARK_GFM_EXTENSIONS_EXPORT
#elif defined(CMARK_GFM_EXTENSIONS_SHARED)       // Using shared.
#  ifdef _WIN32
#    define CMARK_GFM_EXTENSIONS_EXPORT __declspec(dllimport)
#  else
#    define CMARK_GFM_EXTENSIONS_EXPORT
#  endif
#elif defined(CMARK_GFM_EXTENSIONS_SHARED_BUILD) // Building shared.
#  ifdef _WIN32
#    define CMARK_GFM_EXTENSIONS_EXPORT __declspec(dllexport)
#  else
#    define CMARK_GFM_EXTENSIONS_EXPORT __attribute__((visibility("default")))
#  endif
#else
// If none of the above macros are defined, then we assume we are being used
// by some third-party build system that cannot/doesn't signal the library
// type. Note that this fallback works for both static and shared but in case
// of shared will be sub-optimal compared to having dllimport.
//
#  define CMARK_GFM_EXTENSIONS_EXPORT            // Using static or shared.
#endif

/*
 * Undefining these cmake-generated macros is not technically required, but
 * let's keep them for the record.
 */
#undef CMARK_GFM_EXTENSIONS_NO_EXPORT
#undef CMARK_GFM_EXTENSIONS_DEPRECATED
#undef CMARK_GFM_EXTENSIONS_NO_DEPRECATED
#undef CMARK_GFM_EXTENSIONS_DEPRECATED_EXPORT
#undef CMARK_GFM_EXTENSIONS_DEPRECATED_NO_EXPORT

#endif /* CMARK_GFM_EXTENSIONS_EXPORT_H */