From f9fedc930cf36ce6cec69a3d09879b3c7f23eb0b Mon Sep 17 00:00:00 2001 From: Andrei Lebedev Date: Wed, 3 Jul 2019 05:46:14 +0300 Subject: [PATCH] [tbb] Add shared library support for Linux and OSX (#6510) * [tbb] Add shared library support for Linux and OSX Signed-off-by: Andrei Lebedev * Remove whitespace * Simplify string replace * Revert removal of lib exts --- ports/tbb/CMakeLists.txt | 5 ++++- ports/tbb/CONTROL | 2 +- ports/tbb/portfile.cmake | 8 ++++---- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/ports/tbb/CMakeLists.txt b/ports/tbb/CMakeLists.txt index cc1dd39337..7216e3474a 100644 --- a/ports/tbb/CMakeLists.txt +++ b/ports/tbb/CMakeLists.txt @@ -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") diff --git a/ports/tbb/CONTROL b/ports/tbb/CONTROL index e3ae789363..39c34d7849 100644 --- a/ports/tbb/CONTROL +++ b/ports/tbb/CONTROL @@ -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. diff --git a/ports/tbb/portfile.cmake b/ports/tbb/portfile.cmake index 1199167576..4030bec4b2 100644 --- a/ports/tbb/portfile.cmake +++ b/ports/tbb/portfile.cmake @@ -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}" )