1 #ifndef LIBPKGCONF_LIBPKGCONF_API_H
2 #define LIBPKGCONF_LIBPKGCONF_API_H
3 
4 /* Makefile.am specifies visibility using the libtool option -export-symbols-regex '^pkgconf_'
5  * Unfortunately, that is not available when building with cmake, so use attributes instead,
6  * in a way that doesn't depend on any cmake magic.
7  */
8 #if defined(PKGCONFIG_IS_STATIC)
9 # define PKGCONF_API
10 #elif defined(_WIN32) || defined(_WIN64)
11 # if defined(LIBPKGCONF_EXPORT) || defined(DLL_EXPORT)
12 #  define PKGCONF_API __declspec(dllexport)
13 # else
14 #  define PKGCONF_API __declspec(dllimport)
15 # endif
16 #else
17 # define PKGCONF_API __attribute__((visibility("default")))
18 #endif
19 
20 #endif
21