Skip to content

Commit aad2505

Browse files
Changming Sunqti-hungjuiw
authored andcommitted
Update dlpack to a newer version (microsoft#24760)
To include the following change: dmlc/dlpack#165
1 parent 95a0a06 commit aad2505

File tree

3 files changed

+46
-0
lines changed

3 files changed

+46
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
set(VCPKG_BUILD_TYPE release) # header-only port
2+
3+
vcpkg_from_github(
4+
OUT_SOURCE_PATH SOURCE_PATH
5+
REPO dmlc/dlpack
6+
REF 5c210da409e7f1e51ddf445134a4376fdbd70d7d
7+
SHA512 4bc5f5fd36b20ef2943989d5c06fe9cd34f942cdfd4b4866a4405649f7faac47fcdcf3a1fa60eb7b96b643222e5e4b036cbca7d49835dc5f8b659708620a2e8f
8+
HEAD_REF main
9+
)
10+
11+
vcpkg_cmake_configure(
12+
SOURCE_PATH "${SOURCE_PATH}"
13+
OPTIONS
14+
-DBUILD_MOCK=FALSE
15+
)
16+
17+
vcpkg_cmake_install()
18+
19+
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/dlpack")
20+
21+
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib")
22+
23+
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
24+
25+
file(COPY "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")

cmake/vcpkg-ports/dlpack/usage

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
dlpack provides CMake targets:
2+
3+
find_package(dlpack CONFIG REQUIRED)
4+
target_link_libraries(main PRIVATE dlpack::dlpack)
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "dlpack",
3+
"version-semver": "1.1.1",
4+
"description": "DLPack is an open in-memory tensor structure for sharing tensors among frameworks",
5+
"homepage": "https://github.com/dmlc/dlpack",
6+
"license": "Apache-2.0",
7+
"dependencies": [
8+
{
9+
"name": "vcpkg-cmake",
10+
"host": true
11+
},
12+
{
13+
"name": "vcpkg-cmake-config",
14+
"host": true
15+
}
16+
]
17+
}

0 commit comments

Comments
 (0)