mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-28 19:25:27 +08:00
[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:
parent
5c491b245b
commit
c6f055ed5d
@ -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
|
@ -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}")
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user