diff options
author | Tim-Philipp Müller <tim@centricular.com> | 2018-08-25 22:53:07 +0200 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2018-09-23 23:23:01 +0100 |
commit | 50038bed79e056eee109572db03113999cc7eb38 (patch) | |
tree | ddfa6561143f71a4982f54cd02293cf3a34ce6c1 | |
parent | 54e498f2d57ceeed7a68e274e5c3786b4afdc9c0 (diff) | |
download | gstreamer-50038bed79e056eee109572db03113999cc7eb38.tar.gz |
gstconfig.h: add GST_API_IMPORT define
This is for use by the various GST_*_API decorators and
will be what they get defined to when a library API is being
used by external users of that library (not the library itself
whilst it's being compiled).
In most cases it will simply map to a plain 'extern' but on
Windows with MSVC it will need to map to __declspec(dllimport).
For functions this is not strictly needed, but for exported
variables it is.
https://bugzilla.gnome.org/show_bug.cgi?id=797185
-rw-r--r-- | gst/gstconfig.h.in | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gst/gstconfig.h.in b/gst/gstconfig.h.in index 33dfed1f69..cb92a2c5e8 100644 --- a/gst/gstconfig.h.in +++ b/gst/gstconfig.h.in @@ -155,6 +155,12 @@ # endif #endif +#if defined(_MSC_VER) && !defined(GST_STATIC_COMPILATION) +# define GST_API_IMPORT __declspec(dllimport) extern +#else +# define GST_API_IMPORT extern +#endif + #ifndef GST_API #define GST_API GST_EXPORT #endif |