aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Rudolph <18394207+crud89@users.noreply.github.com>2021-07-16 09:15:17 +0200
committerGitHub <noreply@github.com>2021-07-16 00:15:17 -0700
commit394e6f0997ba6c4d09d959099e14889a16be69de (patch)
treef4f427e5adcd7acbd40501a9ee7eea1c50de179b
parentaee68688c3882009d1caafa444bbf49aa7978ac2 (diff)
downloadvcpkg-394e6f0997ba6c4d09d959099e14889a16be69de.tar.gz
vcpkg-394e6f0997ba6c4d09d959099e14889a16be69de.zip
[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>
-rw-r--r--ports/d3d12-memory-allocator/CMakeLists.txt21
-rw-r--r--ports/d3d12-memory-allocator/portfile.cmake22
-rw-r--r--ports/d3d12-memory-allocator/vcpkg.json19
-rw-r--r--versions/baseline.json4
-rw-r--r--versions/d-/d3d12-memory-allocator.json9
5 files changed, 75 insertions, 0 deletions
diff --git a/ports/d3d12-memory-allocator/CMakeLists.txt b/ports/d3d12-memory-allocator/CMakeLists.txt
new file mode 100644
index 000000000..884610b06
--- /dev/null
+++ b/ports/d3d12-memory-allocator/CMakeLists.txt
@@ -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::"
+) \ No newline at end of file
diff --git a/ports/d3d12-memory-allocator/portfile.cmake b/ports/d3d12-memory-allocator/portfile.cmake
new file mode 100644
index 000000000..89a4093bb
--- /dev/null
+++ b/ports/d3d12-memory-allocator/portfile.cmake
@@ -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)
diff --git a/ports/d3d12-memory-allocator/vcpkg.json b/ports/d3d12-memory-allocator/vcpkg.json
new file mode 100644
index 000000000..b31b48509
--- /dev/null
+++ b/ports/d3d12-memory-allocator/vcpkg.json
@@ -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
+ }
+ ]
+}
diff --git a/versions/baseline.json b/versions/baseline.json
index 2a19c0fc7..a25491dbf 100644
--- a/versions/baseline.json
+++ b/versions/baseline.json
@@ -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
diff --git a/versions/d-/d3d12-memory-allocator.json b/versions/d-/d3d12-memory-allocator.json
new file mode 100644
index 000000000..0be166fc9
--- /dev/null
+++ b/versions/d-/d3d12-memory-allocator.json
@@ -0,0 +1,9 @@
+{
+ "versions": [
+ {
+ "git-tree": "988836f8b901c1a30f4b667ac37f81f1ef3bcdd8",
+ "version-date": "2021-05-05",
+ "port-version": 0
+ }
+ ]
+}