Build: use versioned TBB shared library to avoid conflicts with system libs #107587
|
@ -254,7 +254,7 @@ else()
|
|||
harvest(spnav/include spnav/include "*.h")
|
||||
harvest(spnav/lib spnav/lib "*.a")
|
||||
harvest(tbb/include tbb/include "*.h")
|
||||
harvest_rpath_lib(tbb/lib tbb/lib "libtbb${SHAREDLIBEXT}")
|
||||
harvest_rpath_lib(tbb/lib tbb/lib "libtbb${SHAREDLIBEXT}*")
|
||||
harvest(theora/lib ffmpeg/lib "*.a")
|
||||
harvest(tiff/include tiff/include "*.h")
|
||||
harvest(tiff/lib tiff/lib "*.a")
|
||||
|
|
|
@ -31,8 +31,7 @@ if(WIN32)
|
|||
else()
|
||||
set(OPENSUBDIV_EXTRA_ARGS
|
||||
${OPENSUBDIV_EXTRA_ARGS}
|
||||
-DTBB_INCLUDE_DIR=${LIBDIR}/tbb/include
|
||||
-DTBB_tbb_LIBRARY=${LIBDIR}/tbb/lib/${LIBPREFIX}tbb${SHAREDLIBEXT}
|
||||
-DTBB_LOCATION=${LIBDIR}/tbb
|
||||
)
|
||||
endif()
|
||||
|
||||
|
|
|
@ -7,6 +7,12 @@ set(TBB_EXTRA_ARGS
|
|||
-DTBB_BUILD_TESTS=Off
|
||||
-DCMAKE_DEBUG_POSTFIX=_debug
|
||||
)
|
||||
# TBB does not use soversion by default unlike other libs, but it's needed
|
||||
# to avoid conflicts with incompatible TBB system libs in LD_LIBRARY_PATH
|
||||
# or the Steam environment.
|
||||
if(UNIX AND NOT APPLE)
|
||||
list(APPEND TBB_EXTRA_ARGS -DTBB_SET_SOVERSION=ON)
|
||||
endif()
|
||||
set(TBB_LIBRARY tbb)
|
||||
set(TBB_STATIC_LIBRARY Off)
|
||||
|
||||
|
|
Loading…
Reference in New Issue