From 2023db70a88c9c5ae7b38eccfee54b6f35780b5f Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 23 Jun 2011 09:27:56 +0000 Subject: cmake option to build without an audio library. --- source/blender/editors/sound/sound_ops.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'source/blender/editors/sound/sound_ops.c') diff --git a/source/blender/editors/sound/sound_ops.c b/source/blender/editors/sound/sound_ops.c index 3716baad474..b7e8fee922b 100644 --- a/source/blender/editors/sound/sound_ops.c +++ b/source/blender/editors/sound/sound_ops.c @@ -64,7 +64,9 @@ #include "WM_api.h" #include "WM_types.h" -#include "AUD_C-API.h" +#ifdef WITH_AUDASPACE +# include "AUD_C-API.h" +#endif #include "ED_sound.h" #include "ED_util.h" @@ -81,6 +83,7 @@ static void open_init(bContext *C, wmOperator *op) uiIDContextProperty(C, &pprop->ptr, &pprop->prop); } +#ifdef WITH_AUDASPACE static int open_exec(bContext *C, wmOperator *op) { char path[FILE_MAX]; @@ -131,6 +134,17 @@ static int open_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } +#else //WITH_AUDASPACE + +static int open_exec(bContext *UNUSED(C), wmOperator *op) +{ + BKE_report(op->reports, RPT_ERROR, "Compiled without sound support"); + + return OPERATOR_CANCELLED; +} + +#endif + static int open_invoke(bContext *C, wmOperator *op, wmEvent *event) { if(!RNA_property_is_set(op->ptr, "relative_path")) -- cgit v1.2.3