Fix T74504: Cycles wrong progress bar with CPU adaptive sampling
[blender.git] / intern / mantaflow / CMakeLists.txt
1 # ***** BEGIN GPL LICENSE BLOCK *****
2 #
3 # This program is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU General Public License
5 # as published by the Free Software Foundation; either version 2
6 # of the License, or (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software Foundation,
15 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16 #
17 # The Original Code is Copyright (C) 2019, Blender Foundation
18 # All rights reserved.
19 #
20 # The Original Code is: all of this file.
21 #
22 # Contributor(s): Sebastian Barschkis (sebbas)
23 #
24 # ***** END GPL LICENSE BLOCK *****
25
26 add_definitions(-DWITH_FLUID=1)
27
28 if(WITH_OPENVDB)
29   add_definitions(-DOPENVDB=1)
30 else()
31   add_definitions(-DOPENVDB=0)
32 endif()
33
34 if(WIN32)
35   add_definitions(-D_USE_MATH_DEFINES)
36 endif()
37
38
39 set(INC
40   extern
41   intern/strings
42   ../../source/blender/makesdna
43   ../../source/blender/blenlib
44 )
45
46 # Python is always required
47 add_definitions(-DWITH_PYTHON)
48
49 set(INC_SYS
50   ../../extern/mantaflow/helper/util
51   ../../extern/mantaflow/helper/pwrapper
52   ../../extern/mantaflow/preprocessed
53   ${PYTHON_INCLUDE_DIRS}
54   ${ZLIB_INCLUDE_DIRS}
55 )
56
57 if(WITH_TBB)
58   list(APPEND INC_SYS
59     ${TBB_INCLUDE_DIRS}
60   )
61   list(APPEND LIB
62     ${TBB_LIBRARIES}
63   )
64 endif()
65
66 if(WITH_OPENVDB)
67   add_definitions(-DWITH_OPENVDB ${OPENVDB_DEFINITIONS})
68   list(APPEND INC_SYS
69     ${OPENVDB_INCLUDE_DIRS}
70   )
71   list(APPEND LIB
72     ${OPENVDB_LIBRARIES}
73   )
74 endif()
75
76 set(SRC
77   intern/manta_python_API.cpp
78   intern/manta_fluid_API.cpp
79   intern/MANTA_main.cpp
80
81   extern/manta_python_API.h
82   extern/manta_fluid_API.h
83   intern/MANTA_main.h
84   intern/strings/fluid_script.h
85   intern/strings/smoke_script.h
86   intern/strings/liquid_script.h
87 )
88
89 set(LIB
90   extern_mantaflow
91
92   ${PYTHON_LINKFLAGS}
93   ${PYTHON_LIBRARIES}
94   ${ZLIB_LIBRARIES}
95 )
96
97 blender_add_lib(bf_intern_mantaflow "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")