mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-28 03:10:57 +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
|
||||
Supports: !(uwp|arm|arm64) | linux
|
||||
|
@ -24,7 +24,17 @@ if (NOT VCPKG_TARGET_IS_WINDOWS)
|
||||
vcpkg_install_cmake()
|
||||
|
||||
# Settings for TBBConfigInternal.cmake.in
|
||||
set(TBB_LIB_EXT a)
|
||||
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)
|
||||
@ -34,7 +44,7 @@ else()
|
||||
set(RELEASE_CONFIGURATION Release)
|
||||
set(DEBUG_CONFIGURATION Debug)
|
||||
endif()
|
||||
|
||||
|
||||
macro(CONFIGURE_PROJ_FILE arg)
|
||||
set(CONFIGURE_FILE_NAME ${arg})
|
||||
set(CONFIGURE_BAK_FILE_NAME ${arg}.bak)
|
||||
@ -56,7 +66,7 @@ else()
|
||||
file(WRITE ${CONFIGURE_FILE_NAME} "${SLN_CONFIGURE}")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
|
||||
CONFIGURE_PROJ_FILE(${SOURCE_PATH}/build/vs2013/tbb.vcxproj)
|
||||
CONFIGURE_PROJ_FILE(${SOURCE_PATH}/build/vs2013/tbbmalloc.vcxproj)
|
||||
CONFIGURE_PROJ_FILE(${SOURCE_PATH}/build/vs2013/tbbmalloc_proxy.vcxproj)
|
||||
@ -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,9 +133,10 @@ string(REPLACE
|
||||
_contents
|
||||
"${_contents}"
|
||||
)
|
||||
|
||||
string(REPLACE "SHARED IMPORTED)" "UNKNOWN IMPORTED)" _contents "${_contents}")
|
||||
file(WRITE ${CURRENT_PACKAGES_DIR}/share/tbb/TBBConfig.cmake "${_contents}")
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/tbb)
|
||||
# Handle copyright
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
||||
|
Loading…
x
Reference in New Issue
Block a user