From a670993b7b9b18a51e76ad0bcd2c5e86e8d56834 Mon Sep 17 00:00:00 2001 From: ZeroCrunch Date: Tue, 18 Oct 2016 22:53:41 +0100 Subject: [PATCH] Support for Intel's Threading Building Blocks (2016/09/16) --- ports/tbb-20160916/CONTROL | 3 +++ ports/tbb-20160916/portfile.cmake | 41 +++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 ports/tbb-20160916/CONTROL create mode 100644 ports/tbb-20160916/portfile.cmake diff --git a/ports/tbb-20160916/CONTROL b/ports/tbb-20160916/CONTROL new file mode 100644 index 0000000000..c0abc0a255 --- /dev/null +++ b/ports/tbb-20160916/CONTROL @@ -0,0 +1,3 @@ +Source: tbb-20160916 +Version: 2016/09/16 +Description: Intel's Threading Building Blocks. diff --git a/ports/tbb-20160916/portfile.cmake b/ports/tbb-20160916/portfile.cmake new file mode 100644 index 0000000000..315010ba12 --- /dev/null +++ b/ports/tbb-20160916/portfile.cmake @@ -0,0 +1,41 @@ +# Common Ambient Variables: +# VCPKG_ROOT_DIR = +# TARGET_TRIPLET is the current triplet (x86-windows, etc) +# PORT is the current port name (zlib, etc) +# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} +# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} +# + +include(${CMAKE_TRIPLET_FILE}) +include(vcpkg_common_functions) + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/tbb2017_20160916oss) +vcpkg_download_distfile(ARCHIVE + URLS "https://www.threadingbuildingblocks.org/sites/default/files/software_releases/windows/tbb2017_20160916oss_win_1.zip" + FILENAME "tbb2017_20160916oss_win_1.zip" + SHA512 14bbc54aa0c4506bab6e6fdb7e9e562cbc88881cb683a8bd690e3101177e55433f25a2143e7af1ed52edacb44dc92fab354e1f2101bc13b33b3ea137def8bdd1 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +# Installation +message(STATUS "Installing") +file(COPY ${SOURCE_PATH}/bin DESTINATION ${CURRENT_PACKAGES_DIR}/bin) +file(COPY ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(COPY ${SOURCE_PATH}/lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + +# Remove artefacts for other architectures +if(VCPKG_TARGET_ARCHITECTURE STREQUAL x64) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/bin/ia32) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/lib/ia32) +else() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/bin/intel64) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/lib/intel64) +endif() + +vcpkg_copy_pdbs() + +message(STATUS "Installing done") + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/tbb-20160916) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/tbb-20160916/LICENSE ${CURRENT_PACKAGES_DIR}/share/tbb-20160916/copyright)