aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Ormesher <ianormy@gmail.com>2020-11-11 21:38:58 +0000
committerGitHub <noreply@github.com>2020-11-11 13:38:58 -0800
commit6a7a309ab8c4cc002b7c9d9fa5281857d918f381 (patch)
tree2e367696c73fe954c287da49eafb367af414f0c0
parent8ce7b41302728ff6fc8bd377f572c4cbe8c64c1d (diff)
downloadvcpkg-6a7a309ab8c4cc002b7c9d9fa5281857d918f381.tar.gz
vcpkg-6a7a309ab8c4cc002b7c9d9fa5281857d918f381.zip
[onnxruntime-gpu] Add port for onnxruntime (GPU) (#14481)
* feat: Add the port for onnxruntime-gpu This port uses the binaries created by Microsoft for the onnxruntime which will run with a GPU. * Update ports/onnxruntime-gpu/portfile.cmake Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> Co-authored-by: Ian Ormesher <ian.ormesher@zeiss.com> Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>
-rw-r--r--ports/onnxruntime-gpu/portfile.cmake43
-rw-r--r--ports/onnxruntime-gpu/vcpkg.json7
2 files changed, 50 insertions, 0 deletions
diff --git a/ports/onnxruntime-gpu/portfile.cmake b/ports/onnxruntime-gpu/portfile.cmake
new file mode 100644
index 000000000..524936ac2
--- /dev/null
+++ b/ports/onnxruntime-gpu/portfile.cmake
@@ -0,0 +1,43 @@
+vcpkg_fail_port_install(ON_ARCH "x86" "arm" ON_TARGET "UWP" "LINUX" "ANDROID" "FREEBSD" "OSX")
+
+vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
+
+set(VERSION 1.5.1)
+
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://github.com/microsoft/onnxruntime/releases/download/v1.5.1/onnxruntime-win-x64-gpu-1.5.1.zip"
+ FILENAME "onnxruntime-win-x64-gpu-1.5.1.zip"
+ SHA512 893dbed1196b5c9730744dc5566cd3ad8ec677cbea04dd0572efc9a8b3563d3f1cbf40d0dea3d624d9451dc33272c0ae44d53d6deee6f249fa2520e60718ee52
+)
+
+vcpkg_extract_source_archive_ex(
+ OUT_SOURCE_PATH SOURCE_PATH
+ ARCHIVE ${ARCHIVE}
+ NO_REMOVE_ONE_LEVEL
+ REF ${VERSION}
+)
+
+file(MAKE_DIRECTORY
+ ${CURRENT_PACKAGES_DIR}/include
+ ${CURRENT_PACKAGES_DIR}/lib
+ ${CURRENT_PACKAGES_DIR}/bin
+ ${CURRENT_PACKAGES_DIR}/debug/lib
+ ${CURRENT_PACKAGES_DIR}/debug/bin
+ )
+
+file(COPY
+ ${SOURCE_PATH}/onnxruntime-win-x64-gpu-1.5.1/include
+ DESTINATION ${CURRENT_PACKAGES_DIR}
+ )
+
+file(COPY ${SOURCE_PATH}/onnxruntime-win-x64-gpu-1.5.1/lib/onnxruntime.lib
+ DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
+file(COPY ${SOURCE_PATH}/onnxruntime-win-x64-gpu-1.5.1/lib/onnxruntime.lib
+ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
+file(COPY ${SOURCE_PATH}/onnxruntime-win-x64-gpu-1.5.1/lib/onnxruntime.dll
+ DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
+file(COPY ${SOURCE_PATH}/onnxruntime-win-x64-gpu-1.5.1/lib/onnxruntime.dll
+ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
+
+# # Handle copyright
+file(INSTALL ${SOURCE_PATH}/onnxruntime-win-x64-gpu-1.5.1/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
diff --git a/ports/onnxruntime-gpu/vcpkg.json b/ports/onnxruntime-gpu/vcpkg.json
new file mode 100644
index 000000000..b656e7df3
--- /dev/null
+++ b/ports/onnxruntime-gpu/vcpkg.json
@@ -0,0 +1,7 @@
+{
+ "name": "onnxruntime-gpu",
+ "version-string": "1.5.1",
+ "description": "onnxruntime (GPU)",
+ "homepage": "https://github.com/microsoft/onnxruntime",
+ "supports": "windows & !x86 & !uwp & !static & !arm"
+}