mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-05 09:50:04 +08:00
2beb86eab4
* [tbb] update to 2021.8.0 * v db * add _debug suffix * v db * add 32 suffix on x86 * v db
51 lines
1.5 KiB
CMake
51 lines
1.5 KiB
CMake
vcpkg_minimum_required(VERSION 2022-10-12) # for ${VERSION}
|
|
|
|
set(VCPKG_POLICY_MISMATCHED_NUMBER_OF_BINARIES enabled)
|
|
|
|
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO oneapi-src/oneTBB
|
|
REF "v${VERSION}"
|
|
SHA512 72f68730dfd89409796f9548d3c302111787712089688a7c77092ed1b3a7bf4e7444fe4b58015d2c78b7b71259852526789b2483bf1e71bea8146c4b4676e7b4
|
|
HEAD_REF onetbb_2021
|
|
)
|
|
|
|
vcpkg_cmake_configure(
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
OPTIONS
|
|
-DTBB_TEST=OFF
|
|
-DTBB_STRICT=OFF
|
|
)
|
|
|
|
vcpkg_cmake_install()
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/TBB")
|
|
vcpkg_fixup_pkgconfig()
|
|
vcpkg_copy_pdbs()
|
|
|
|
set(arch_suffix "")
|
|
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
|
|
set(arch_suffix "32")
|
|
endif()
|
|
|
|
|
|
if(NOT VCPKG_BUILD_TYPE)
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/tbb${arch_suffix}.pc" "-ltbb12" "-ltbb12_debug")
|
|
endif()
|
|
|
|
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"
|
|
)
|
|
|
|
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}")
|
|
|
|
file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|