[Bf-blender-cvs] [302d857] gooseberry: Gooseberry: Fix compilation with OpenVDB disabled
Sergey Sharybin
noreply at git.blender.org
Sun Jun 14 15:04:21 CEST 2015
Commit: 302d8572acf25f2bff537ae4de9a1644ac094287
Author: Sergey Sharybin
Date: Sun Jun 14 14:55:27 2015 +0200
Branches: gooseberry
https://developer.blender.org/rB302d8572acf25f2bff537ae4de9a1644ac094287
Gooseberry: Fix compilation with OpenVDB disabled
It was giving an issues when building with SCons and disabled OpenVDB.
Likely need to be backported to openvdb branch.
===================================================================
M source/blender/blenkernel/CMakeLists.txt
M source/blender/blenkernel/intern/smoke.c
M source/blender/editors/object/CMakeLists.txt
M source/blender/editors/object/object_modifier.c
M source/blender/editors/space_view3d/CMakeLists.txt
M source/blender/editors/space_view3d/SConscript
M source/blender/editors/space_view3d/drawobject.c
M source/blender/nodes/CMakeLists.txt
M source/blender/nodes/SConscript
M source/blender/nodes/shader/nodes/node_shader_openvdb.c
===================================================================
diff --git a/source/blender/blenkernel/CMakeLists.txt b/source/blender/blenkernel/CMakeLists.txt
index b4e37d2..6ccde9c 100644
--- a/source/blender/blenkernel/CMakeLists.txt
+++ b/source/blender/blenkernel/CMakeLists.txt
@@ -46,7 +46,6 @@ set(INC
../../../intern/iksolver/extern
../../../intern/memutil
../../../intern/mikktspace
- ../../../intern/openvdb
../../../intern/raskter
../../../intern/smoke/extern
../../../intern/atomic
@@ -494,6 +493,9 @@ endif()
if(WITH_OPENVDB)
add_definitions(-DWITH_OPENVDB)
add_definitions(-DOPENVDB_USE_BLOSC)
+ list(APPEND INC
+ ../../../../intern/openvdb
+ )
endif()
## Warnings as errors, this is too strict!
diff --git a/source/blender/blenkernel/intern/smoke.c b/source/blender/blenkernel/intern/smoke.c
index d1bb997..c8fc991 100644
--- a/source/blender/blenkernel/intern/smoke.c
+++ b/source/blender/blenkernel/intern/smoke.c
@@ -90,7 +90,10 @@
/* #define USE_SMOKE_COLLISION_DM */
#include "smoke_API.h"
-#include "openvdb_capi.h"
+
+#ifdef WITH_OPENVDB
+# include "openvdb_capi.h"
+#endif
#ifdef WITH_SMOKE
diff --git a/source/blender/editors/object/CMakeLists.txt b/source/blender/editors/object/CMakeLists.txt
index 618b806..15a5ded 100644
--- a/source/blender/editors/object/CMakeLists.txt
+++ b/source/blender/editors/object/CMakeLists.txt
@@ -34,7 +34,6 @@ set(INC
../../windowmanager
../../../../intern/guardedalloc
../../../../intern/glew-mx
- ../../../../intern/openvdb
)
set(INC_SYS
@@ -81,4 +80,11 @@ if(WITH_INTERNATIONAL)
add_definitions(-DWITH_INTERNATIONAL)
endif()
+if(WITH_OPENVDB)
+ add_definitions(-DWITH_OPENVDB)
+ list(APPEND INC
+ ../../../../intern/openvdb
+ )
+endif()
+
blender_add_lib(bf_editor_object "${SRC}" "${INC}" "${INC_SYS}")
diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c
index e72c8d2..eb751aa 100644
--- a/source/blender/editors/object/object_modifier.c
+++ b/source/blender/editors/object/object_modifier.c
@@ -93,7 +93,10 @@
#include "WM_types.h"
#include "object_intern.h"
-#include "openvdb_capi.h"
+
+#ifdef WITH_OPENVDB
+# include "openvdb_capi.h"
+#endif
static void modifier_skin_customdata_delete(struct Object *ob);
diff --git a/source/blender/editors/space_view3d/CMakeLists.txt b/source/blender/editors/space_view3d/CMakeLists.txt
index 9ab2dbb..9879475 100644
--- a/source/blender/editors/space_view3d/CMakeLists.txt
+++ b/source/blender/editors/space_view3d/CMakeLists.txt
@@ -33,7 +33,6 @@ set(INC
../../depsgraph
../../../../intern/guardedalloc
../../../../intern/glew-mx
- ../../../../intern/openvdb
../../../../intern/smoke/extern
)
@@ -93,6 +92,9 @@ endif()
if(WITH_OPENVDB)
add_definitions(-DWITH_OPENVDB)
+ list(APPEND INC
+ ../../../../intern/openvdb
+ )
endif()
blender_add_lib(bf_editor_space_view3d "${SRC}" "${INC}" "${INC_SYS}")
diff --git a/source/blender/editors/space_view3d/SConscript b/source/blender/editors/space_view3d/SConscript
index 78f2494..d5e36be 100644
--- a/source/blender/editors/space_view3d/SConscript
+++ b/source/blender/editors/space_view3d/SConscript
@@ -66,4 +66,8 @@ if env['WITH_BF_INTERNATIONAL']:
if env['WITH_BF_FREESTYLE']:
defs.append('WITH_FREESTYLE')
+if env['WITH_BF_OPENVDB']:
+ incs.append('#intern/openvdb')
+ defs.append('WITH_OPENVDB')
+
env.BlenderLib ( 'bf_editors_space_view3d', sources, incs, defines = defs, libtype=['core'], priority=[40] )
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index 9db1693..7c759f5 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -105,7 +105,9 @@
#include "WM_api.h"
#include "BLF_api.h"
-#include "openvdb_capi.h"
+#ifdef WITH_OPENVDB
+# include "openvdb_capi.h"
+#endif
#include "view3d_intern.h" /* bad level include */
diff --git a/source/blender/nodes/CMakeLists.txt b/source/blender/nodes/CMakeLists.txt
index fc2e5f7..037ce3c 100644
--- a/source/blender/nodes/CMakeLists.txt
+++ b/source/blender/nodes/CMakeLists.txt
@@ -39,7 +39,6 @@ set(INC
../render/extern/include
../../../intern/guardedalloc
../../../intern/glew-mx
- ../../../intern/openvdb
)
set(INC_SYS
@@ -293,6 +292,9 @@ endif()
if(WITH_OPENVDB)
add_definitions(-DWITH_OPENVDB)
add_definitions(-DOPENVDB_USE_BLOSC)
+ list(APPEND INC
+ ../../../intern/openvdb
+ )
endif()
blender_add_lib(bf_nodes "${SRC}" "${INC}" "${INC_SYS}")
diff --git a/source/blender/nodes/SConscript b/source/blender/nodes/SConscript
index d429600..a41be4b 100644
--- a/source/blender/nodes/SConscript
+++ b/source/blender/nodes/SConscript
@@ -48,7 +48,6 @@ incs = [
'../imbuf',
'../makesdna',
'../makesrna',
- '../openvdb',
'../render/extern/include',
env['BF_ZLIB_INC'],
]
diff --git a/source/blender/nodes/shader/nodes/node_shader_openvdb.c b/source/blender/nodes/shader/nodes/node_shader_openvdb.c
index ebbb64f..0b8b996 100644
--- a/source/blender/nodes/shader/nodes/node_shader_openvdb.c
+++ b/source/blender/nodes/shader/nodes/node_shader_openvdb.c
@@ -27,7 +27,9 @@
#include "../node_shader_util.h"
-#include "openvdb_capi.h"
+#ifdef WITH_OPENVDB
+# include "openvdb_capi.h"
+#endif
static bNodeSocketTemplate sh_node_openvdb_in[] = {
{SOCK_VECTOR, 1, N_("Vector"), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_NONE, SOCK_HIDE_VALUE},
More information about the Bf-blender-cvs
mailing list