[d3d12-memory-allocator] new port (#18212)

* Added d3d12 memory allocator port.

* Fixed leftover name from vulkan memory allocator.

* Remove single header patch.

* Don't apply patch.

* Properly set interface sources.

* Bump version and update manifest format.

* Build static library instead of using an interface target.

* Properly export and fixup config.

* Update baseline.

* Remove `PREFER_NINJA`.

Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>

* Update version.

* Use `version-date` instead of `version`.

* Update baseline.

* Remove leftover version.

Co-authored-by: Robert Schumacher <roschuma@microsoft.com>

Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
This commit is contained in:
Carsten Rudolph 2021-07-16 09:15:17 +02:00 committed by GitHub
parent aee68688c3
commit 394e6f0997
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 75 additions and 0 deletions

View File

@ -0,0 +1,21 @@
cmake_minimum_required(VERSION 3.0)
project(d3d12-memory-allocator)
add_library(${PROJECT_NAME} STATIC
"src/D3D12MemAlloc.h"
"src/D3D12MemAlloc.cpp"
)
set_target_properties(${PROJECT_NAME} PROPERTIES PUBLIC_HEADER "src/D3D12MemAlloc.h")
#target_include_directories(${PROJECT_NAME} PRIVATE "src/")
install(
TARGETS ${PROJECT_NAME} EXPORT ${PROJECT_NAME}-config
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
PUBLIC_HEADER DESTINATION include/
)
install(
EXPORT ${PROJECT_NAME}-config DESTINATION cmake/
NAMESPACE "unofficial::"
)

View File

@ -0,0 +1,22 @@
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO GPUOpen-LibrariesAndSDKs/D3D12MemoryAllocator
REF 10f148cef0dfd34ae1a9373b9396beb1581c992a
SHA512 c99934a606ce5a5c9c59e05faf2e659bfad2e485b58aaf00f38219a6c89f17b62033f4a69935915f0d5269a4f0ecba41037b044913ae6f4077fa981eaab470c8
HEAD_REF master
)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH}
)
vcpkg_cmake_install()
vcpkg_copy_pdbs()
vcpkg_cmake_config_fixup(CONFIG_PATH cmake/)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)

View File

@ -0,0 +1,19 @@
{
"name": "d3d12-memory-allocator",
"version-date": "2021-05-05",
"description": "Easy to integrate D3d12 memory allocation library from GPUOpen",
"homepage": "https://gpuopen.com/gaming-product/d3d12-memory-allocator/",
"license": "MIT",
"supports": "windows",
"dependencies": [
"directx-headers",
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}

View File

@ -1592,6 +1592,10 @@
"baseline": "4.2.1",
"port-version": 0
},
"d3d12-memory-allocator": {
"baseline": "2021-05-05",
"port-version": 0
},
"d3dx12": {
"baseline": "may2021",
"port-version": 0

View File

@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "988836f8b901c1a30f4b667ac37f81f1ef3bcdd8",
"version-date": "2021-05-05",
"port-version": 0
}
]
}