[tbb] Add shared library support for Linux and OSX (#6510)

* [tbb] Add shared library support for Linux and OSX

Signed-off-by: Andrei Lebedev <lebdron@gmail.com>

* Remove whitespace

* Simplify string replace

* Revert removal of lib exts
This commit is contained in:
Andrei Lebedev 2019-07-03 05:46:14 +03:00 committed by Griffin Downs
parent 269fa0e6be
commit f9fedc930c
3 changed files with 9 additions and 6 deletions

View File

@ -4,7 +4,10 @@ file(GLOB SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*)
file(COPY ${SOURCES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/src)
include(${CMAKE_CURRENT_BINARY_DIR}/src/cmake/TBBBuild.cmake REQUIRED)
tbb_build(TBB_ROOT ${CMAKE_CURRENT_BINARY_DIR}/src MAKE_ARGS extra_inc=big_iron.inc)
if(NOT BUILD_SHARED_LIBS)
set(TBB_STATIC_INCLUDE extra_inc=big_iron.inc)
endif()
tbb_build(TBB_ROOT ${CMAKE_CURRENT_BINARY_DIR}/src MAKE_ARGS ${TBB_STATIC_INCLUDE})
set(SUBDIR ${CMAKE_CURRENT_BINARY_DIR}/tbb_cmake_build/tbb_cmake_build_subdir)
if(CMAKE_BUILD_TYPE STREQUAL "Release")

View File

@ -1,4 +1,4 @@
Source: tbb
Version: 2019_U7
Version: 2019_U7-1
Homepage: https://github.com/01org/tbb
Description: Intel's Threading Building Blocks.

View File

@ -78,14 +78,14 @@ string(REPLACE
"${_contents}"
)
string(REPLACE
"set(_tbb_release_lib \"/${TBB_LIB_PREFIX}\${_tbb_component}.${TBB_LIB_EXT}\")"
"set(_tbb_release_lib \"\${_tbb_root}/lib/${TBB_LIB_PREFIX}\${_tbb_component}.${TBB_LIB_EXT}\")"
"set(_tbb_release_lib \"/${TBB_LIB_PREFIX}"
"set(_tbb_release_lib \"\${_tbb_root}/lib/${TBB_LIB_PREFIX}"
_contents
"${_contents}"
)
string(REPLACE
"set(_tbb_debug_lib \"/${TBB_LIB_PREFIX}\${_tbb_component}_debug.${TBB_LIB_EXT}\")"
"set(_tbb_debug_lib \"\${_tbb_root}/debug/lib/${TBB_LIB_PREFIX}\${_tbb_component}_debug.${TBB_LIB_EXT}\")"
"set(_tbb_debug_lib \"/${TBB_LIB_PREFIX}"
"set(_tbb_debug_lib \"\${_tbb_root}/debug/lib/${TBB_LIB_PREFIX}"
_contents
"${_contents}"
)