Build: Add TBB define to BMesh module

Allows using BLI_task.hh to write multithreaded code.
This commit is contained in:
Hans Goudey 2022-10-13 12:45:55 -05:00
parent 6beeba1ef5
commit 1703a8fb33
1 changed files with 16 additions and 0 deletions

View File

@ -207,6 +207,22 @@ if(WITH_GMP)
)
endif()
if(WITH_TBB)
add_definitions(-DWITH_TBB)
if(WIN32)
# TBB includes Windows.h which will define min/max macros
# that will collide with the stl versions.
add_definitions(-DNOMINMAX)
endif()
list(APPEND INC_SYS
${TBB_INCLUDE_DIRS}
)
list(APPEND LIB
${TBB_LIBRARIES}
)
endif()
blender_add_lib(bf_bmesh "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
if(MSVC AND NOT MSVC_CLANG)