aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Kahn <jacobkahn1@gmail.com>2020-12-17 02:12:26 -0600
committerGitHub <noreply@github.com>2020-12-17 00:12:26 -0800
commit4c9cdfefdb0da2ab3c9510524ebcb0ddd9a46ab9 (patch)
tree61269d73ad7808df91ce6961d3c9246bbad48311
parent981e65ce0ac1f6c86e5a5ded7824db8780173c76 (diff)
downloadvcpkg-4c9cdfefdb0da2ab3c9510524ebcb0ddd9a46ab9.tar.gz
vcpkg-4c9cdfefdb0da2ab3c9510524ebcb0ddd9a46ab9.zip
[oneDNN] New port (#15068)
-rw-r--r--ports/onednn/portfile.cmake25
-rw-r--r--ports/onednn/vcpkg.json6
2 files changed, 31 insertions, 0 deletions
diff --git a/ports/onednn/portfile.cmake b/ports/onednn/portfile.cmake
new file mode 100644
index 000000000..4a9600ac7
--- /dev/null
+++ b/ports/onednn/portfile.cmake
@@ -0,0 +1,25 @@
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO oneapi-src/oneDNN
+ REF v2.0
+ SHA512 740fa871e29edc8bb8a54d4ba615e856712f7f63efe4c70f4a3d5f6d143d60bc51366b9355ab4b6702718ba711b48350ea49b1335ec10c1dc4f655cc9728ff3e
+ HEAD_REF master
+)
+
+if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ set(DNNL_OPTIONS "-DDNNL_LIBRARY_TYPE=STATIC")
+endif()
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS ${DNNL_OPTIONS}
+)
+vcpkg_install_cmake()
+
+vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake)
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
+
+# Copyright and license
+file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
diff --git a/ports/onednn/vcpkg.json b/ports/onednn/vcpkg.json
new file mode 100644
index 000000000..7ceebd191
--- /dev/null
+++ b/ports/onednn/vcpkg.json
@@ -0,0 +1,6 @@
+{
+ "name": "onednn",
+ "version-string": "2.0",
+ "description": "oneAPI Deep Neural Network Library (oneDNN)",
+ "supports": "x64 & !uwp"
+}