Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions cmake/vcpkg-ports/dlpack/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
set(VCPKG_BUILD_TYPE release) # header-only port

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO dmlc/dlpack
REF 5c210da409e7f1e51ddf445134a4376fdbd70d7d
SHA512 4bc5f5fd36b20ef2943989d5c06fe9cd34f942cdfd4b4866a4405649f7faac47fcdcf3a1fa60eb7b96b643222e5e4b036cbca7d49835dc5f8b659708620a2e8f
HEAD_REF main
)

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DBUILD_MOCK=FALSE
)

vcpkg_cmake_install()

vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/dlpack")

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib")

vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")

file(COPY "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
4 changes: 4 additions & 0 deletions cmake/vcpkg-ports/dlpack/usage
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
dlpack provides CMake targets:

find_package(dlpack CONFIG REQUIRED)
target_link_libraries(main PRIVATE dlpack::dlpack)
17 changes: 17 additions & 0 deletions cmake/vcpkg-ports/dlpack/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "dlpack",
"version-semver": "1.1.1",
"description": "DLPack is an open in-memory tensor structure for sharing tensors among frameworks",
"homepage": "https://github.com/dmlc/dlpack",
"license": "Apache-2.0",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}
Loading