aboutsummaryrefslogtreecommitdiff
path: root/libpkgconf/libpkgconf-api.h
blob: 1c4fb73ad7c9992e878912253e50e17be673fcd4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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