Skip to content

Commit 26aa0e9

Browse files
committed
update
1 parent 71a2155 commit 26aa0e9

File tree

3 files changed

+46
-0
lines changed

3 files changed

+46
-0
lines changed
+25
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 "v${VERSION}"
7+
SHA512 bdf27bdb6d24db2da9155b9c78e62faf043e0aa4d54dba4cadac312c2b87533ae1b44ecebd462a764141297baa35884c1379902d655bab8a71fe65838c7b1e9b
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

+4
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)

cmake/vcpkg-ports/dlpack/vcpkg.json

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "dlpack",
3+
"version": "1.0",
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)