summaryrefslogtreecommitdiffstats
path: root/include/lilv
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2021-01-02 13:23:32 +0100
committerDavid Robillard <d@drobilla.net>2021-01-02 14:13:00 +0100
commitfd3d431a84bea557f71dfd9246d557080447648e (patch)
tree9303a3a6b9101722852b0a73f92fbe8346fa45bf /include/lilv
parent9f07922f0f92d655d47226502faed719ef0f7892 (diff)
downloadlilv-fd3d431a84bea557f71dfd9246d557080447648e.tar.gz
lilv-fd3d431a84bea557f71dfd9246d557080447648e.tar.bz2
lilv-fd3d431a84bea557f71dfd9246d557080447648e.zip
Use LILV_STATIC instead of LILV_SHARED to control visibility
For consistency, this seems to be the most common convention.
Diffstat (limited to 'include/lilv')
-rw-r--r--include/lilv/lilv.h20
1 files changed, 7 insertions, 13 deletions
diff --git a/include/lilv/lilv.h b/include/lilv/lilv.h
index b803cb1..ac34b81 100644
--- a/include/lilv/lilv.h
+++ b/include/lilv/lilv.h
@@ -29,22 +29,16 @@
#include <stdint.h>
#include <stdio.h>
-#ifdef LILV_SHARED
-# ifdef _WIN32
-# define LILV_LIB_IMPORT __declspec(dllimport)
-# define LILV_LIB_EXPORT __declspec(dllexport)
-# else
-# define LILV_LIB_IMPORT __attribute__((visibility("default")))
-# define LILV_LIB_EXPORT __attribute__((visibility("default")))
-# endif
-# ifdef LILV_INTERNAL
-# define LILV_API LILV_LIB_EXPORT
-# else
-# define LILV_API LILV_LIB_IMPORT
-# endif
+#if defined(_WIN32) && !defined(LILV_STATIC) && defined(LILV_INTERNAL)
+# define LILV_API __declspec(dllexport)
+#elif defined(_WIN32) && !defined(LILV_STATIC)
+# define LILV_API __declspec(dllimport)
+#elif defined(__GNUC__)
+# define LILV_API __attribute__((visibility("default")))
#else
# define LILV_API
#endif
+
#if defined(__GNUC__) && \
(__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
# define LILV_DEPRECATED __attribute__((__deprecated__))