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:
authorKévin Dietrich <kevin.dietrich@mailoo.org>2016-01-23 10:39:29 +0300
committerKévin Dietrich <kevin.dietrich@mailoo.org>2016-01-23 10:39:40 +0300
commite9452f909cdba368f54637cd0b15ff14d1c60cf3 (patch)
tree7d276fa9063f351e8b9f128f4436b87c2338c764 /CMakeLists.txt
parent275abd14a0963a42aeb6e7fcd9b61ac8bc00da42 (diff)
Implementation of OpenVDB as a possible cache format for smoke
simulations. This commits implements OpenVDB as an extra cache format in the Point Cache system for smoke simulations. Compilation with the library is turned off by default for now, and shall be enabled when the library is present. A documentation of its doings is available here: http:// wiki.blender.org/index.php/User:Kevindietrich/OpenVDBSmokeExport. A guide to compile OpenVDB can be found here (Linux): http:// wiki.blender.org/index.php?title=Dev:Doc/Building_Blender/Linux/ Dependencies_From_Source#OpenVDB Reviewers: sergey, lukastoenne, brecht, campbellbarton Reviewed By: brecht, campbellbarton Subscribers: galenb, Blendify, robocyte, Lapineige, bliblubli, jtheninja, lukasstockner97, dingto, brecht Differential Revision: https://developer.blender.org/D1721
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt53
1 files changed, 51 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e0326f1d75e..4ec5053eb58 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -242,6 +242,9 @@ option(WITH_OPENSUBDIV "Enable OpenSubdiv for surface subdivision" _init_OPEN
option(WITH_SUBSURF_WERROR "Treat warnings as errors in subsurf code" OFF)
mark_as_advanced(WITH_COMPOSITOR_WERROR)
+option(WITH_OPENVDB "Enable features relying on OpenVDB" OFF)
+option(WITH_OPENVDB_BLOSC "Enable blosc compression for OpenVDB, only enable if OpenVDB was built with blosc support" OFF)
+
# GHOST Windowing Library Options
option(WITH_GHOST_DEBUG "Enable debugging output for the GHOST library" OFF)
mark_as_advanced(WITH_GHOST_DEBUG)
@@ -677,10 +680,11 @@ if(NOT WITH_BOOST)
set_and_warn(WITH_CYCLES OFF)
set_and_warn(WITH_AUDASPACE OFF)
set_and_warn(WITH_INTERNATIONAL OFF)
+ set_and_warn(WITH_OPENVDB OFF)
set_and_warn(WITH_OPENAL OFF) # depends on AUDASPACE
set_and_warn(WITH_GAMEENGINE OFF) # depends on AUDASPACE
-elseif(WITH_CYCLES OR WITH_OPENIMAGEIO OR WITH_AUDASPACE OR WITH_INTERNATIONAL)
+elseif(WITH_CYCLES OR WITH_OPENIMAGEIO OR WITH_AUDASPACE OR WITH_INTERNATIONAL OR WITH_OPENVDB)
# Keep enabled
else()
# Enabled but we don't need it
@@ -1056,6 +1060,24 @@ if(UNIX AND NOT APPLE)
endif()
endif()
+ if(WITH_OPENVDB)
+ find_package_wrapper(OpenVDB)
+
+ set(TBB ${LIBDIR}/tbb)
+ set(TBB_LIBRARIES tbb)
+ set(TBB_LIBPATH ${TBB}/lib)
+
+ set(OPENVDB_LIBRARIES ${OPENVDB_LIBRARIES} ${BOOST_LIBRARIES} ${ZLIB_LIBRARIES} ${TBB_LIBRARIES})
+ set(OPENVDB_LIBPATH) # TODO, remove and reference the absolute path everywhere
+ set(OPENVDB_DEFINITIONS)
+
+ if(NOT OPENVDB_FOUND)
+ set(WITH_OPENVDB OFF)
+ set(WITH_OPENVDB_BLOSC OFF)
+ message(STATUS "OpenVDB not found")
+ endif()
+ endif()
+
if(WITH_BOOST)
# uses in build instructions to override include and library variables
if(NOT BOOST_CUSTOM)
@@ -1076,6 +1098,9 @@ if(UNIX AND NOT APPLE)
if(WITH_CYCLES_NETWORK)
list(APPEND __boost_packages serialization)
endif()
+ if(WITH_OPENVDB)
+ list(APPEND __boost_packages iostreams)
+ endif()
find_package(Boost 1.48 COMPONENTS ${__boost_packages})
if(NOT Boost_FOUND)
# try to find non-multithreaded if -mt not found, this flag
@@ -1561,7 +1586,14 @@ elseif(WIN32)
set(OPENCOLORIO_LIBPATH ${LIBDIR}/opencolorio/lib)
set(OPENCOLORIO_DEFINITIONS)
endif()
-
+
+ if(WITH_OPENVDB)
+ set(OPENVDB ${LIBDIR}/openvdb)
+ set(OPENVDB_INCLUDE_DIRS ${OPENVDB}/include)
+ set(OPENVDB_LIBRARIES openvdb ${TBB_LIBRARIES})
+ set(OPENVDB_LIBPATH ${LIBDIR}/openvdb/lib)
+ set(OPENVDB_DEFINITIONS)
+ endif()
if(WITH_MOD_CLOTH_ELTOPO)
set(LAPACK ${LIBDIR}/lapack)
@@ -1834,6 +1866,14 @@ elseif(WIN32)
set(SDL_LIBPATH ${SDL}/lib)
endif()
+ if(WITH_OPENVDB)
+ set(OPENVDB ${LIBDIR}/openvdb)
+ set(OPENVDB_INCLUDE_DIRS ${OPENVDB}/include)
+ set(OPENVDB_LIBRARIES openvdb ${TBB_LIBRARIES})
+ set(OPENVDB_LIBPATH ${LIBDIR}/openvdb/lib)
+ set(OPENVDB_DEFINITIONS)
+ endif()
+
set(PLATFORM_LINKFLAGS "-Xlinker --stack=2097152")
## DISABLE - causes linking errors
@@ -2139,6 +2179,14 @@ elseif(APPLE)
set(OPENCOLORIO_LIBPATH ${OPENCOLORIO}/lib)
endif()
+ if(WITH_OPENVDB)
+ set(OPENVDB ${LIBDIR}/openvdb)
+ set(OPENVDB_INCLUDE_DIRS ${OPENVDB}/include)
+ set(OPENVDB_LIBRARIES openvdb ${TBB_LIBRARIES})
+ set(OPENVDB_LIBPATH ${LIBDIR}/openvdb/lib)
+ set(OPENVDB_DEFINITIONS)
+ endif()
+
if(WITH_LLVM)
set(LLVM_ROOT_DIR ${LIBDIR}/llvm CACHE PATH "Path to the LLVM installation")
set(LLVM_VERSION "3.4" CACHE STRING "Version of LLVM to use")
@@ -2981,6 +3029,7 @@ if(FIRST_RUN)
info_cfg_option(WITH_CYCLES)
info_cfg_option(WITH_FREESTYLE)
info_cfg_option(WITH_OPENCOLORIO)
+ info_cfg_option(WITH_OPENVDB)
info_cfg_text("Compiler Options:")
info_cfg_option(WITH_BUILDINFO)