Hello all. Does anyone know how to set the version of tbb used when building blender?
I would prefer to not have to downgrade tbb, because this breaks many other packages, and would force me to downgrade all of them, as well. That cascade is very difficult to manage.
For context, this is what I have tried in order to force Blender to build against TBB soversion 12.4 (which is what is in Artix). I don't really understand their weird python build scripts, or even CMake, apparently.
Built options and env vars
export TBB_SET_SOVERSION=ON
export TBB_SET_SOVERSION=ON
export TBB_VERSION=12.4
export TBB_VERSION=12.4
export TBB_SOVERSION=12.4
export SET_TBB_VERSION=12.4
export SET_TBB_SOVERSION=12.4
export TBB_MAJOR_VERSION=12
export TBB_VERSION_MAJOR=12
export TBB_MINOR_VERSION=4
export TBB_VERSION_MINOR=4
MakeOpts=(
(...more options we don't need to see here...)
-DTBB_SET_SOVERSION=ON
-DCMAKE_TBB_SET_SOVERSION=ON
-DTBB_VERSION=12.4
-DCMAKE_TBB_VERSION=12.4
-DCMAKE_TBB_SOVERSION=12.4
-DCMAKE_SET_TBB_VERSION=12.4
-DCMAKE_SET_TBB_SOVERSION=12.4
-DCMAKE_TBB_MAJOR_VERSION=12
-DCMAKE_TBB_VERSION_MAJOR=12
-DCMAKE_TBB_MINOR_VERSION=4
-DCMAKE_TBB_VERSION_MINOR=4
);
cmake "${MakeOpts[@]}"
CMake... patch files???
diff --git a/build_files/build_environment/patches/cmakelists_tbb.txt b/build_files/build_environment/patches/cmakelists_tbb.txt
index e05f27afdd6..a7c6429661d 100644
--- a/build_files/build_environment/patches/cmakelists_tbb.txt
+++ b/build_files/build_environment/patches/cmakelists_tbb.txt
@@ -287,7 +287,7 @@ if (TBB_BUILD_SHARED)
target_include_directories(tbb INTERFACE "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>" "$<INSTALL_INTERFACE:${TBB_INSTALL_INCLUDE_DIR}>")
set_property(TARGET tbb APPEND_STRING PROPERTY COMPILE_FLAGS ${ENABLE_RTTI})
if (TBB_SET_SOVERSION)
- set_property(TARGET tbb PROPERTY SOVERSION 2)
+ set_property(TARGET tbb PROPERTY SOVERSION 12.4)
endif ()
target_compile_definitions(tbb
@@ -359,7 +359,7 @@ if(TBB_BUILD_TBBMALLOC)
set_property(TARGET tbbmalloc APPEND PROPERTY COMPILE_DEFINITIONS "__TBBMALLOC_BUILD=1")
set_property(TARGET tbbmalloc APPEND_STRING PROPERTY COMPILE_FLAGS ${DISABLE_RTTI})
if (TBB_SET_SOVERSION)
- set_property(TARGET tbbmalloc PROPERTY SOVERSION 2)
+ set_property(TARGET bbmalloc PROPERTY SOVERSION 12.4)
endif ()
add_dependencies(tbbmalloc tbb_def_files)
if (APPLE)
@@ -407,7 +407,7 @@ if(TBB_BUILD_TBBMALLOC_PROXY)
set_property(TARGET tbbmalloc_proxy APPEND PROPERTY COMPILE_DEFINITIONS "__TBBMALLOC_BUILD=1")
set_property(TARGET tbbmalloc_proxy APPEND_STRING PROPERTY COMPILE_FLAGS ${DISABLE_RTTI})
if (TBB_SET_SOVERSION)
- set_property(TARGET tbbmalloc_proxy PROPERTY SOVERSION 2)
+ set_property(TARGET tbbmalloc_proxy PROPERTY SOVERSION 12.4)
endif ()
target_link_libraries(tbbmalloc_proxy PUBLIC tbbmalloc)
if (TBB_INSTALL_TARGETS)
@@ -647,6 +647,7 @@ if (TBB_BUILD_PYTHON)
endif ()
# UseSWIG generates now standard target names
+
if (CMAKE_VERSION VERSION_LESS 3.13)
set (module_target ${SWIG_MODULE_api_REAL_NAME})
else ()