Fix/workaround initialization order of static TBB/MKL

Was caused by recent refactor of dependencies in 517870a4a1.

While there is no fully reliable solution to this issue other than
making TBB a dynamic library dependency (as documentation tells us
to do), there seems to be simple workaround which doesn't require
deeper changed in build process and packaging.

Tested on Brecht's computer who managed to reproduce the issue on
Linux (T72015#857423).
This commit is contained in:
Sergey Sharybin
2020-01-24 12:47:35 +01:00
parent 71d53ab465
commit 18343c230d
2 changed files with 21 additions and 18 deletions

View File

@@ -38,6 +38,14 @@ blender_include_dirs(
)
set(LIB
# This forces TBB libraries to be in front of MKL (which is a part of OpenImageDenoise).
#
# The need of this comes to need to ensure static libraries initialization order, making it
# so TBB is initialized prior to MKL (or any other dpeendnecy).
#
# This isn't fully robust but seems to work.
${TBB_LIBRARIES}
bf_windowmanager
)