From 4beec8f055fd3b0cc4ef618cce8b52c58dd0ee08 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Wed, 6 Sep 2017 17:40:06 +0300 Subject: Add implementation --- libpkgconf/libpkgconf-api.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 libpkgconf/libpkgconf-api.h (limited to 'libpkgconf/libpkgconf-api.h') 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 -- cgit v1.1