From 41cad1e44a88940bab551a996b94c978717cedca Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 17 Feb 2011 02:57:24 +0000 Subject: Make ui.h C++ compatible. git-svn-id: http://svn.drobilla.net/lad/trunk/slv2@2971 a436a847-0d15-0410-975c-d299462d15a1 --- slv2/slv2.h | 8 ++++---- slv2/ui.h | 8 ++++++++ src/slv2_internal.h | 4 ++-- wscript | 5 ++++- 4 files changed, 18 insertions(+), 7 deletions(-) diff --git a/slv2/slv2.h b/slv2/slv2.h index c761873..8c198bd 100644 --- a/slv2/slv2.h +++ b/slv2/slv2.h @@ -19,15 +19,15 @@ #ifndef SLV2_SLV2_H__ #define SLV2_SLV2_H__ -#ifdef __cplusplus -extern "C" { -#endif - #include #include #include "lv2/lv2plug.in/ns/lv2core/lv2.h" +#ifdef __cplusplus +extern "C" { +#endif + #if defined _WIN32 || defined __CYGWIN__ #define SLV2_LIB_IMPORT __declspec(dllimport) #define SLV2_LIB_EXPORT __declspec(dllexport) diff --git a/slv2/ui.h b/slv2/ui.h index 369ed5e..f8b4b02 100644 --- a/slv2/ui.h +++ b/slv2/ui.h @@ -22,6 +22,10 @@ #include "slv2/slv2.h" #include "lv2/lv2plug.in/ns/extensions/ui/ui.h" +#ifdef __cplusplus +extern "C" { +#endif + /** @addtogroup slv2 * @{ */ @@ -164,4 +168,8 @@ slv2_ui_instance_get_handle(SLV2UIInstance instance); /** @} */ /** @} */ +#ifdef __cplusplus +} /* extern "C" */ +#endif + #endif /* SLV2_SLV2_UI_H__ */ diff --git a/src/slv2_internal.h b/src/slv2_internal.h index 36f294e..a52f62e 100644 --- a/src/slv2_internal.h +++ b/src/slv2_internal.h @@ -16,8 +16,6 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. */ -#include "slv2-config.h" - #ifndef SLV2_INTERNAL_H__ #define SLV2_INTERNAL_H__ @@ -37,6 +35,8 @@ extern "C" { #include "serd/serd.h" #include "sord/sord.h" +#include "slv2-config.h" + #ifdef SLV2_DYN_MANIFEST #include "lv2/lv2plug.in/ns/ext/dyn-manifest/dyn-manifest.h" #endif diff --git a/wscript b/wscript index c2f81b2..55921d8 100644 --- a/wscript +++ b/wscript @@ -179,7 +179,10 @@ def build(bld): ''' if bld.env['SLV2_WITH_UI']: - lib_source += ' src/pluginui.c src/pluginuiinstance.c ' + lib_source += ''' + src/pluginui.c + src/pluginuiinstance.c + ''' # Library obj = bld(features = 'c cshlib') -- cgit v1.2.1