Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-06-23 13:27:56 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-06-23 13:27:56 +0400
commit2023db70a88c9c5ae7b38eccfee54b6f35780b5f (patch)
tree59f071e5f75e12f344567665ecc0370a0b091eb9 /source/blender/editors
parent9c2aa3d0ffb93881bf1e2763ab28893533f02bd7 (diff)
cmake option to build without an audio library.
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/sound/CMakeLists.txt8
-rw-r--r--source/blender/editors/sound/sound_ops.c16
-rw-r--r--source/blender/editors/space_graph/CMakeLists.txt8
-rw-r--r--source/blender/editors/space_graph/graph_edit.c16
-rw-r--r--source/blender/editors/space_sequencer/CMakeLists.txt8
-rw-r--r--source/blender/editors/space_sequencer/sequencer_add.c5
6 files changed, 55 insertions, 6 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"))
diff --git a/source/blender/editors/space_graph/CMakeLists.txt b/source/blender/editors/space_graph/CMakeLists.txt
index f5548097db2..b7cde90546c 100644
--- a/source/blender/editors/space_graph/CMakeLists.txt
+++ b/source/blender/editors/space_graph/CMakeLists.txt
@@ -28,7 +28,6 @@ set(INC
../../makesrna
../../windowmanager
../../../../intern/guardedalloc
- ../../../../intern/audaspace/intern
)
set(INC_SYS
@@ -47,4 +46,11 @@ set(SRC
graph_intern.h
)
+if(WITH_AUDASPACE)
+ list(APPEND INC
+ ../../../../intern/audaspace/intern
+ )
+ add_definitions(-DWITH_AUDASPACE)
+endif()
+
blender_add_lib(bf_editor_space_graph "${SRC}" "${INC}" "${INC_SYS}")
diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c
index 962cadba1f3..fe9b3187a65 100644
--- a/source/blender/editors/space_graph/graph_edit.c
+++ b/source/blender/editors/space_graph/graph_edit.c
@@ -37,7 +37,9 @@
#include <string.h>
#include <float.h>
-#include "AUD_C-API.h"
+#ifdef WITH_AUDASPACE
+# include "AUD_C-API.h"
+#endif
#include "MEM_guardedalloc.h"
@@ -1079,6 +1081,7 @@ static float fcurve_samplingcb_sound (FCurve *UNUSED(fcu), void *data, float eva
/* ------------------- */
+#ifdef WITH_AUDASPACE
static int graphkeys_sound_bake_exec(bContext *C, wmOperator *op)
{
bAnimContext ac;
@@ -1149,6 +1152,17 @@ static int graphkeys_sound_bake_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
+#else //WITH_AUDASPACE
+
+static int graphkeys_sound_bake_exec(bContext *UNUSED(C), wmOperator *op)
+{
+ BKE_report(op->reports, RPT_ERROR, "Compiled without sound support");
+
+ return OPERATOR_CANCELLED;
+}
+
+#endif //WITH_AUDASPACE
+
static int graphkeys_sound_bake_invoke (bContext *C, wmOperator *op, wmEvent *event)
{
bAnimContext ac;
diff --git a/source/blender/editors/space_sequencer/CMakeLists.txt b/source/blender/editors/space_sequencer/CMakeLists.txt
index d5f36719471..71a4cfca868 100644
--- a/source/blender/editors/space_sequencer/CMakeLists.txt
+++ b/source/blender/editors/space_sequencer/CMakeLists.txt
@@ -29,7 +29,6 @@ set(INC
../../makesrna
../../windowmanager
../../../../intern/guardedalloc
- ../../../../intern/audaspace/intern
)
set(INC_SYS
@@ -49,4 +48,11 @@ set(SRC
sequencer_intern.h
)
+if(WITH_AUDASPACE)
+ list(APPEND INC
+ ../../../../intern/audaspace/intern
+ )
+ add_definitions(-DWITH_AUDASPACE)
+endif()
+
blender_add_lib(bf_editor_space_sequencer "${SRC}" "${INC}" "${INC_SYS}")
diff --git a/source/blender/editors/space_sequencer/sequencer_add.c b/source/blender/editors/space_sequencer/sequencer_add.c
index 067d63b3b6c..f6e3dc3dd0a 100644
--- a/source/blender/editors/space_sequencer/sequencer_add.c
+++ b/source/blender/editors/space_sequencer/sequencer_add.c
@@ -70,7 +70,10 @@
#include "UI_view2d.h"
#include "BKE_sound.h"
-#include "AUD_C-API.h"
+
+#ifdef WITH_AUDASPACE
+# include "AUD_C-API.h"
+#endif
/* own include */
#include "sequencer_intern.h"