[tbb] fix shared tbb library configuration build under *nix (#14555)

* fix shared tbb library configuration build under *nix

* bump Port Version

* installing missed TBBConfigVersion.cmake
This commit is contained in:
Eli Arzhannikov 2020-11-13 22:56:26 +01:00 committed by GitHub
parent 5c491b245b
commit c6f055ed5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 6 deletions

View File

@ -1,6 +1,6 @@
Source: tbb
Version: 2020_U3
Port-Version: 1
Port-Version: 2
Homepage: https://github.com/01org/tbb
Description: Intel's Threading Building Blocks.
Supports: !(uwp|arm|arm64) | linux

View File

@ -24,7 +24,17 @@ if (NOT VCPKG_TARGET_IS_WINDOWS)
vcpkg_install_cmake()
# Settings for TBBConfigInternal.cmake.in
if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
set(TBB_LIB_EXT a)
else()
if (VCPKG_TARGET_IS_LINUX)
set(TBB_LIB_EXT "so.2")
elseif(VCPKG_TARGET_IS_OSX)
set(TBB_LIB_EXT "dylib")
else()
set(TBB_LIB_EXT "so")
endif()
endif()
set(TBB_LIB_PREFIX lib)
else()
if (VCPKG_CRT_LINKAGE STREQUAL static)
@ -97,6 +107,13 @@ configure_file(
${CURRENT_PACKAGES_DIR}/share/tbb/TBBConfig.cmake
@ONLY
)
configure_file(
${SOURCE_PATH}/cmake/templates/TBBConfigVersion.cmake.in
${CURRENT_PACKAGES_DIR}/share/tbb/TBBConfigVersion.cmake
@ONLY
)
file(READ ${CURRENT_PACKAGES_DIR}/share/tbb/TBBConfig.cmake _contents)
string(REPLACE
"get_filename_component(_tbb_root \"\${_tbb_root}\" PATH)"
@ -116,6 +133,7 @@ string(REPLACE
_contents
"${_contents}"
)
string(REPLACE "SHARED IMPORTED)" "UNKNOWN IMPORTED)" _contents "${_contents}")
file(WRITE ${CURRENT_PACKAGES_DIR}/share/tbb/TBBConfig.cmake "${_contents}")