diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-06-23 13:27:56 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-06-23 13:27:56 +0400 |
commit | 2023db70a88c9c5ae7b38eccfee54b6f35780b5f (patch) | |
tree | 59f071e5f75e12f344567665ecc0370a0b091eb9 /source/blender/editors/sound | |
parent | 9c2aa3d0ffb93881bf1e2763ab28893533f02bd7 (diff) |
cmake option to build without an audio library.
Diffstat (limited to 'source/blender/editors/sound')
-rw-r--r-- | source/blender/editors/sound/CMakeLists.txt | 8 | ||||
-rw-r--r-- | source/blender/editors/sound/sound_ops.c | 16 |
2 files changed, 22 insertions, 2 deletions
diff --git a/source/blender/editors/sound/CMakeLists.txt b/source/blender/editors/sound/CMakeLists.txt index 6a99971a5af..55af283b5de 100644 --- a/source/blender/editors/sound/CMakeLists.txt +++ b/source/blender/editors/sound/CMakeLists.txt @@ -28,7 +28,6 @@ set(INC ../../makesrna ../../windowmanager ../../../../intern/guardedalloc - ../../../../intern/audaspace/intern ) set(INC_SYS @@ -41,4 +40,11 @@ set(SRC sound_intern.h ) +if(WITH_AUDASPACE) + list(APPEND INC + ../../../../intern/audaspace/intern + ) + add_definitions(-DWITH_AUDASPACE) +endif() + blender_add_lib(bf_editor_sound "${SRC}" "${INC}" "${INC_SYS}") 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")) |