Skip to content

Commit d2c22fb

Browse files
Fix openVDB build on Ubuntu 24.04 by replacing obsolete Half library with Imath
1 parent 6cd638b commit d2c22fb

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

CMakeLists.txt

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#
1111
#******************************************************************************
1212

13-
cmake_minimum_required(VERSION 2.8)
13+
cmake_minimum_required(VERSION 3.5)
1414
project (MantaFlow)
1515

1616
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/tools/cmake/")
@@ -122,10 +122,6 @@ else()
122122
set(PYTHON_VER_ID ${PYTHON_VERSION})
123123
endif()
124124

125-
if(OPENVDB AND NOT TBB)
126-
message(FATAL_ERROR "Cannot activate OPENVDB without TBB")
127-
endif()
128-
129125
MESSAGE(STATUS "")
130126
MESSAGE(STATUS "Options - "
131127
" -DDEBUG='${DEBUG}' "
@@ -387,7 +383,7 @@ if(OPENVDB)
387383
else()
388384
message("Warning - OpenVDB not found, trying default paths")
389385
# might be in path...
390-
list(APPEND F_LIBS Half openvdb tbb)
386+
list(APPEND F_LIBS Imath openvdb tbb)
391387
endif()
392388
endif()
393389

@@ -399,7 +395,7 @@ if(OPENVDB)
399395
list(APPEND INCLUDE_PATHS ${HOUDINI_INCLUDE_DIRS})
400396
list(APPEND INCLUDE_PATHS ${HOUDINI_INCLUDE_DIRS}/OpenEXR)
401397
list(APPEND F_LIB_PATHS ${HOUDINI_LIBRARY_DIRS})
402-
list(APPEND F_LIBS "Half.lib")
398+
list(APPEND F_LIBS "Imath.lib")
403399
endif()
404400
else()
405401
# for open exr - should be in the default path, add includes if necessary

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Mantaflow #
22

33
Mantaflow is an open-source framework targeted at fluid simulation research in Computer Graphics.
4-
Its parallelized C++ solver core, python scene definition interface and plugin system allow for quickly prototyping and testing new algorithms.
4+
Its parallelized C++ solver core, python scene definition interface and plugin system allow for quickly prototyping and testing new algorithms.
55

66
In addition, it provides a toolbox of examples for deep learning experiments with fluids. E.g., it contains examples
77
how to build convolutional neural network setups in conjunction with the [tensorflow framework](https://www.tensorflow.org).
@@ -17,7 +17,7 @@ This installation guide focusses on Ubuntu 24.04 as a distribution. The process
1717

1818
First, install a few pre-requisites:
1919

20-
sudo apt install pt-get install cmake g++ git python3-dev qt5-qmake libqt5opengl5-dev libopenvdb-dev
20+
sudo apt install pt-get install cmake g++ git python3-dev qt5-qmake libqt5opengl5-dev libtbb-dev libopenvdb-dev
2121

2222
If you want to enable CUDA support, additionally get the latest toolkit from nVidia, and install the appropriate developer driver (be careful though, these driver tend to wreck X11 - get some installation instructions from the web if this is the first time you install CUDA on Linux)
2323

@@ -29,8 +29,12 @@ To build the project using CMake, set up a build directory and choose the build
2929

3030
mkdir mantaflow/build
3131
cd mantaflow/build
32-
cmake .. -DGUI=ON -DOPENMP=ON
33-
make -j4
32+
cmake .. -DGUI=ON -DOPENVDB=ON
33+
make -j8
34+
35+
To build Mantaflow with OpenVDB support with Threading Building Blocks (TBB), you need to disable GUI. There is an issue with duplicated symbols between Qt and Threading Building Blocks (TBB):
36+
37+
cmake .. -DTBB=ON -DOPENVDB=ON
3438

3539
That's it! You can now test mantaflow using an example scene
3640

0 commit comments

Comments
 (0)