2022-11-18 15:25:06 +08:00
|
|
|
|
2022-03-18 04:52:30 +08:00
|
|
|
set(VCPKG_POLICY_MISMATCHED_NUMBER_OF_BINARIES enabled)
|
|
|
|
|
2017-05-22 17:57:19 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
2020-03-23 12:07:13 +08:00
|
|
|
REPO oneapi-src/oneTBB
|
2022-11-18 15:25:06 +08:00
|
|
|
REF "v${VERSION}"
|
2024-11-05 16:55:18 +08:00
|
|
|
SHA512 c87b84964b2c323f61895a532968dfa6413a774c177cffbf6e798a07e74e8da5d449144875771df0a1b02657eeb2a7ae4d41c6c432dbf7ea50e3d5a9ea9f8cd3
|
2024-07-02 03:52:22 +08:00
|
|
|
HEAD_REF master
|
2018-08-29 14:19:08 +08:00
|
|
|
)
|
2017-05-22 17:57:19 +08:00
|
|
|
|
2023-05-31 03:33:33 +08:00
|
|
|
vcpkg_check_features(
|
|
|
|
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
|
|
INVERTED_FEATURES
|
|
|
|
hwloc TBB_DISABLE_HWLOC_AUTOMATIC_SEARCH)
|
|
|
|
|
2022-09-24 03:03:33 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
|
|
OPTIONS
|
2023-05-31 03:33:33 +08:00
|
|
|
${FEATURE_OPTIONS}
|
2022-09-24 03:03:33 +08:00
|
|
|
-DTBB_TEST=OFF
|
|
|
|
-DTBB_STRICT=OFF
|
2018-08-29 14:19:08 +08:00
|
|
|
)
|
2020-11-14 05:56:26 +08:00
|
|
|
|
2022-09-24 03:03:33 +08:00
|
|
|
vcpkg_cmake_install()
|
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/TBB")
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
2023-01-31 09:13:24 +08:00
|
|
|
if(NOT VCPKG_BUILD_TYPE)
|
2023-06-06 05:01:15 +08:00
|
|
|
if(VCPKG_TARGET_ARCHITECTURE MATCHES "^(x86|arm|wasm32)$")
|
|
|
|
set(arch_suffix "32")
|
|
|
|
endif()
|
2023-08-19 03:26:31 +08:00
|
|
|
if(VCPKG_TARGET_IS_WINDOWS)
|
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/tbb${arch_suffix}.pc" "-ltbb12" "-ltbb12_debug")
|
|
|
|
else()
|
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/tbb${arch_suffix}.pc" "-ltbb" "-ltbb_debug")
|
|
|
|
endif()
|
2023-06-06 05:01:15 +08:00
|
|
|
unset(arch_suffix)
|
2023-01-31 09:13:24 +08:00
|
|
|
endif()
|
2023-06-06 05:01:15 +08:00
|
|
|
vcpkg_fixup_pkgconfig()
|
2023-01-31 09:13:24 +08:00
|
|
|
|
2022-09-24 03:03:33 +08:00
|
|
|
file(REMOVE_RECURSE
|
|
|
|
"${CURRENT_PACKAGES_DIR}/share/doc"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/include"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/share"
|
|
|
|
# These are duplicate libraries provided on Windows -- users should use the tbb12 libraries instead
|
|
|
|
"${CURRENT_PACKAGES_DIR}/lib/tbb.lib"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/lib/tbb_debug.lib"
|
2019-04-09 14:23:31 +08:00
|
|
|
)
|
2020-11-14 05:56:26 +08:00
|
|
|
|
2022-09-24 03:03:33 +08:00
|
|
|
file(READ "${CURRENT_PACKAGES_DIR}/share/tbb/TBBConfig.cmake" _contents)
|
|
|
|
file(WRITE "${CURRENT_PACKAGES_DIR}/share/tbb/TBBConfig.cmake" "
|
|
|
|
include(CMakeFindDependencyMacro)
|
|
|
|
find_dependency(Threads)
|
|
|
|
${_contents}")
|
2016-10-19 05:53:41 +08:00
|
|
|
|
2023-04-26 13:45:36 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt")
|