diff options
author | David Robillard <d@drobilla.net> | 2022-12-19 18:54:51 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-12-19 19:03:03 -0500 |
commit | 8c4670332fa16ab063b7f5bad62246ab7ae43a9c (patch) | |
tree | ec8d47fdcaa8b9473c4a81cb4901a620aff73be2 | |
parent | 7d02ac164d0da0a7b2e6f1e19fb2ffa90ed469c5 (diff) | |
download | suil-8c4670332fa16ab063b7f5bad62246ab7ae43a9c.tar.gz suil-8c4670332fa16ab063b7f5bad62246ab7ae43a9c.tar.bz2 suil-8c4670332fa16ab063b7f5bad62246ab7ae43a9c.zip |
Allow SUIL_API to be defined by the user
-rw-r--r-- | NEWS | 5 | ||||
-rw-r--r-- | include/suil/suil.h | 10 |
2 files changed, 9 insertions, 6 deletions
@@ -1,11 +1,12 @@ suil (0.10.19) unstable; urgency=medium + * Allow SUIL_API to be defined by the user * Fix dependencies in pkg-config file * Override pkg-config dependency within meson - * Replace duplicated dox_to_sphinx script with sphinxygen dependency * Remove Gtk in Qt and Qt in Gtk wrappers + * Replace duplicated dox_to_sphinx script with sphinxygen dependency - -- David Robillard <d@drobilla.net> Sun, 11 Dec 2022 17:52:13 +0000 + -- David Robillard <d@drobilla.net> Mon, 19 Dec 2022 23:54:42 +0000 suil (0.10.18) stable; urgency=medium diff --git a/include/suil/suil.h b/include/suil/suil.h index c821641..7f7f3a7 100644 --- a/include/suil/suil.h +++ b/include/suil/suil.h @@ -11,6 +11,7 @@ #include <stdbool.h> #include <stdint.h> +// SUIL_LIB_IMPORT and SUIL_LIB_EXPORT mark the entry points of shared libraries #ifdef _WIN32 # define SUIL_LIB_IMPORT __declspec(dllimport) # define SUIL_LIB_EXPORT __declspec(dllexport) @@ -19,14 +20,15 @@ # define SUIL_LIB_EXPORT __attribute__((visibility("default"))) #endif -#ifndef SUIL_STATIC -# ifdef SUIL_INTERNAL +// SUIL_API exposes symbols in the public API +#ifndef SUIL_API +# ifdef SUIL_STATIC +# define SUIL_API +# elif defined(SUIL_INTERNAL) # define SUIL_API SUIL_LIB_EXPORT # else # define SUIL_API SUIL_LIB_IMPORT # endif -#else -# define SUIL_API #endif #ifdef __cplusplus |