diff options
Diffstat (limited to 'libpkgconf/libpkgconf-api.h')
-rw-r--r-- | libpkgconf/libpkgconf-api.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/libpkgconf/libpkgconf-api.h b/libpkgconf/libpkgconf-api.h new file mode 100644 index 0000000..1c4fb73 --- /dev/null +++ b/libpkgconf/libpkgconf-api.h @@ -0,0 +1,20 @@ +#ifndef PKGCONFG_API +#define PKGCONFG_API + +/* Makefile.am specifies visibility using the libtool option -export-symbols-regex '^pkgconf_' + * Unfortunately, that is not available when building with cmake, so use attributes instead, + * in a way that doesn't depend on any cmake magic. + */ +#if defined(PKGCONFIG_IS_STATIC) +# define PKGCONF_API +#elif defined(_WIN32) || defined(_WIN64) +# ifdef LIBPKGCONF_EXPORT +# define PKGCONF_API __declspec(dllexport) +# else +# define PKGCONF_API __declspec(dllimport) +# endif +#else +# define PKGCONF_API __attribute__((visibility("default"))) +#endif + +#endif |