diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-06-30 18:14:22 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-06-30 18:14:22 +0400 |
commit | 90dc1d1353ec85b67e76a3c93eacf7f7216deaae (patch) | |
tree | c2836de60cbf5beef1dd7002f105189d6b4f2fa1 | |
parent | e6d55c97ddea01ba08c9f01888adf715ab2c6ef0 (diff) |
the compositor optional for cmake: WITH_COMPOSITOR
-rw-r--r-- | CMakeLists.txt | 1 | ||||
-rw-r--r-- | source/blender/CMakeLists.txt | 5 | ||||
-rw-r--r-- | source/blender/nodes/CMakeLists.txt | 8 | ||||
-rw-r--r-- | source/blender/nodes/SConscript | 2 | ||||
-rw-r--r-- | source/blender/nodes/composite/node_composite_tree.c | 13 | ||||
-rw-r--r-- | source/creator/CMakeLists.txt | 8 |
6 files changed, 31 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index dd843e11c8e..0f8fe7c8019 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -130,6 +130,7 @@ option(WITH_FFTW3 "Enable FFTW3 support (Used for smoke and audio effect option(WITH_BULLET "Enable Bullet (Physics Engine)" ON) option(WITH_GAMEENGINE "Enable Game Engine" ON) option(WITH_PLAYER "Build Player" OFF) +option(WITH_COMPOSITOR "Enable the tile based nodal compositor" ON) # GHOST Windowing Library Options option(WITH_GHOST_DEBUG "Enable debugging output for the GHOST library" OFF) diff --git a/source/blender/CMakeLists.txt b/source/blender/CMakeLists.txt index a0d840b5de6..3241acd7df6 100644 --- a/source/blender/CMakeLists.txt +++ b/source/blender/CMakeLists.txt @@ -95,7 +95,6 @@ add_subdirectory(blenkernel) add_subdirectory(blenlib) add_subdirectory(bmesh) add_subdirectory(render) -add_subdirectory(compositor) add_subdirectory(blenfont) add_subdirectory(blenloader) add_subdirectory(ikplugin) @@ -108,6 +107,10 @@ add_subdirectory(modifiers) add_subdirectory(makesdna) add_subdirectory(makesrna) +if(WITH_COMPOSITOR) + add_subdirectory(compositor) +endif() + if(WITH_IMAGE_OPENEXR) add_subdirectory(imbuf/intern/openexr) endif() diff --git a/source/blender/nodes/CMakeLists.txt b/source/blender/nodes/CMakeLists.txt index 2415c7842a7..ce5ce1d87c1 100644 --- a/source/blender/nodes/CMakeLists.txt +++ b/source/blender/nodes/CMakeLists.txt @@ -35,7 +35,6 @@ set(INC ../makesrna ../render/extern/include ../../../intern/guardedalloc - ../compositor ) set(INC_SYS @@ -243,4 +242,11 @@ if(WITH_IMAGE_OPENEXR) add_definitions(-DWITH_OPENEXR) endif() +if(WITH_COMPOSITOR) + list(APPEND INC + ../compositor + ) + add_definitions(-DWITH_COMPOSITOR) +endif() + blender_add_lib(bf_nodes "${SRC}" "${INC}" "${INC_SYS}") diff --git a/source/blender/nodes/SConscript b/source/blender/nodes/SConscript index 86178b31688..d9fabc10a63 100644 --- a/source/blender/nodes/SConscript +++ b/source/blender/nodes/SConscript @@ -37,6 +37,8 @@ if env['OURPLATFORM'] == 'linux': if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc', 'win64-mingw'): incs += ' ' + env['BF_PTHREADS_INC'] +defs.append("WITH_COMPOSITOR") + env.BlenderLib ( libname = 'bf_nodes', sources = sources, includes = Split(incs), defines = defs, libtype=['core','player'], priority = [190,105] ) env.BlenderLib ( libname = 'bf_cmpnodes', sources = cmpsources, includes = Split(incs), defines = defs, libtype=['core','player'], priority = [175,101] ) env.BlenderLib ( libname = 'bf_shdnodes', sources = shdsources, includes = Split(incs), defines = defs, libtype=['core','player'], priority = [175,101] ) diff --git a/source/blender/nodes/composite/node_composite_tree.c b/source/blender/nodes/composite/node_composite_tree.c index b716f19a697..b886ee80d55 100644 --- a/source/blender/nodes/composite/node_composite_tree.c +++ b/source/blender/nodes/composite/node_composite_tree.c @@ -59,7 +59,10 @@ #include "NOD_composite.h" #include "node_composite_util.h" -#include "COM_compositor.h" + +#ifdef WITH_COMPOSITOR +# include "COM_compositor.h" +#endif static void foreach_nodetree(Main *main, void *calldata, bNodeTreeCallback func) { @@ -351,6 +354,8 @@ void ntreeCompositEndExecTree(bNodeTreeExec *exec, int use_tree_data) } } +#ifdef WITH_COMPOSITOR + /* ***************************** threaded version for execute composite nodes ************* */ /* these are nodes without input, only giving values */ /* or nodes with only value inputs */ @@ -586,7 +591,6 @@ static void ntree_composite_texnode(bNodeTree *ntree, int init) } /* optimized tree execute test for compositing */ -/* optimized tree execute test for compositing */ static void ntreeCompositExecTreeOld(bNodeTree *ntree, RenderData *rd, int do_preview) { bNodeExec *nodeexec; @@ -677,13 +681,18 @@ static void ntreeCompositExecTreeOld(bNodeTree *ntree, RenderData *rd, int do_pr /* XXX top-level tree uses the ntree->execdata pointer */ ntreeCompositEndExecTree(exec, 1); } +#endif void ntreeCompositExecTree(bNodeTree *ntree, RenderData *rd, int rendering, int do_preview) { +#ifdef WITH_COMPOSITOR if (G.rt == 200) ntreeCompositExecTreeOld(ntree, rd, do_preview); else COM_execute(rd, ntree, rendering); +#else + (void)ntree, (void)rd, (void)rendering, (void)do_preview; +#endif } /* *********************************************** */ diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index 033b1352e51..d9ac43d7622 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -894,11 +894,15 @@ endif() cycles_kernel cycles_util cycles_subd - bf_compositor #added for opencl compositor - bf_opencl #added for opencl compositor bf_intern_raskter ) + if(WITH_COMPOSITOR) + #added for opencl compositor + list(APPEND BLENDER_SORTED_LIBS bf_compositor) + list(APPEND BLENDER_SORTED_LIBS bf_opencl) + endif() + if(WITH_LIBMV) list(APPEND BLENDER_SORTED_LIBS extern_libmv) list(APPEND BLENDER_SORTED_LIBS extern_ceres) |