From 7801a341a632b7ce28344da31ce025a178198924 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A9rill=20T?= Date: Fri, 4 Sep 2020 23:22:33 +0200 Subject: [PATCH 1/6] [d3dx12] new port --- ports/d3dx12/portfile.cmake | 42 +++++++++++++++++++++++++++++++++++++ ports/d3dx12/vcpkg.json | 6 ++++++ 2 files changed, 48 insertions(+) create mode 100644 ports/d3dx12/portfile.cmake create mode 100644 ports/d3dx12/vcpkg.json diff --git a/ports/d3dx12/portfile.cmake b/ports/d3dx12/portfile.cmake new file mode 100644 index 00000000000000..83c1651e003002 --- /dev/null +++ b/ports/d3dx12/portfile.cmake @@ -0,0 +1,42 @@ +# Common Ambient Variables: +# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} +# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} +# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT} +# CURRENT_INSTALLED_DIR = ${VCPKG_ROOT_DIR}\installed\${TRIPLET} +# DOWNLOADS = ${VCPKG_ROOT_DIR}\downloads +# PORT = current port name (zlib, etc) +# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc) +# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic) +# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic) +# VCPKG_ROOT_DIR = +# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) +# VCPKG_TOOLCHAIN = ON OFF +# TRIPLET_SYSTEM_ARCH = arm x86 x64 +# BUILD_ARCH = "Win32" "x64" "ARM" +# MSBUILD_PLATFORM = "Win32"/"x64"/${TRIPLET_SYSTEM_ARCH} +# DEBUG_CONFIG = "Debug Static" "Debug Dll" +# RELEASE_CONFIG = "Release Static"" "Release DLL" +# VCPKG_TARGET_IS_WINDOWS +# VCPKG_TARGET_IS_UWP +# VCPKG_TARGET_IS_LINUX +# VCPKG_TARGET_IS_OSX +# VCPKG_TARGET_IS_FREEBSD +# VCPKG_TARGET_IS_ANDROID +# VCPKG_TARGET_IS_MINGW +# VCPKG_TARGET_EXECUTABLE_SUFFIX +# VCPKG_TARGET_STATIC_LIBRARY_SUFFIX +# VCPKG_TARGET_SHARED_LIBRARY_SUFFIX +# +# See additional helpful variables in /docs/maintainers/vcpkg_common_definitions.md + +# # Specifies if the port install should fail immediately given a condition +# vcpkg_fail_port_install(MESSAGE "@PORT@ currently only supports Linux and Mac platforms" ON_TARGET "Windows") + +vcpkg_download_distfile(D3DX12_H + URLS "https://raw.githubusercontent.com/microsoft/DirectX-Graphics-Samples/master/Libraries/D3DX12/d3dx12.h" + FILENAME "d3dx12.h" + SHA512 "e41936bec06db9e22e953b31de418981343d5a4df4979d359a4c427d90f58ccee41fba73b9b0b8251d957dbdf4f9b7730ee11846f59f23636b862685a0fc21dc" +) + +file(INSTALL ${D3DX12_H} DESTINATION ${CURRENT_PACKAGES_DIR}/include/) +file(WRITE "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" "") diff --git a/ports/d3dx12/vcpkg.json b/ports/d3dx12/vcpkg.json new file mode 100644 index 00000000000000..79a80eb99c0127 --- /dev/null +++ b/ports/d3dx12/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "d3dx12", + "version-string": "12aug2020", + "description": "The D3D12 Helper Library", + "homepage": "https://github.com/microsoft/DirectX-Graphics-Samples/tree/master/Libraries/D3DX12" +} From 46518be718b56514a3a58f0bc75964aa1f6322e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A9rill=20T=C3=A9terel?= <59962715+mteterel@users.noreply.github.com> Date: Mon, 7 Sep 2020 09:55:45 +0200 Subject: [PATCH 2/6] Apply suggestions from code review Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> --- ports/d3dx12/portfile.cmake | 35 +---------------------------------- ports/d3dx12/vcpkg.json | 2 +- 2 files changed, 2 insertions(+), 35 deletions(-) diff --git a/ports/d3dx12/portfile.cmake b/ports/d3dx12/portfile.cmake index 83c1651e003002..a9874ba88a6004 100644 --- a/ports/d3dx12/portfile.cmake +++ b/ports/d3dx12/portfile.cmake @@ -1,37 +1,4 @@ -# Common Ambient Variables: -# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} -# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} -# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT} -# CURRENT_INSTALLED_DIR = ${VCPKG_ROOT_DIR}\installed\${TRIPLET} -# DOWNLOADS = ${VCPKG_ROOT_DIR}\downloads -# PORT = current port name (zlib, etc) -# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc) -# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic) -# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic) -# VCPKG_ROOT_DIR = -# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) -# VCPKG_TOOLCHAIN = ON OFF -# TRIPLET_SYSTEM_ARCH = arm x86 x64 -# BUILD_ARCH = "Win32" "x64" "ARM" -# MSBUILD_PLATFORM = "Win32"/"x64"/${TRIPLET_SYSTEM_ARCH} -# DEBUG_CONFIG = "Debug Static" "Debug Dll" -# RELEASE_CONFIG = "Release Static"" "Release DLL" -# VCPKG_TARGET_IS_WINDOWS -# VCPKG_TARGET_IS_UWP -# VCPKG_TARGET_IS_LINUX -# VCPKG_TARGET_IS_OSX -# VCPKG_TARGET_IS_FREEBSD -# VCPKG_TARGET_IS_ANDROID -# VCPKG_TARGET_IS_MINGW -# VCPKG_TARGET_EXECUTABLE_SUFFIX -# VCPKG_TARGET_STATIC_LIBRARY_SUFFIX -# VCPKG_TARGET_SHARED_LIBRARY_SUFFIX -# -# See additional helpful variables in /docs/maintainers/vcpkg_common_definitions.md - -# # Specifies if the port install should fail immediately given a condition -# vcpkg_fail_port_install(MESSAGE "@PORT@ currently only supports Linux and Mac platforms" ON_TARGET "Windows") - +# Header-only library vcpkg_download_distfile(D3DX12_H URLS "https://raw.githubusercontent.com/microsoft/DirectX-Graphics-Samples/master/Libraries/D3DX12/d3dx12.h" FILENAME "d3dx12.h" diff --git a/ports/d3dx12/vcpkg.json b/ports/d3dx12/vcpkg.json index 79a80eb99c0127..a8721e71cb83a7 100644 --- a/ports/d3dx12/vcpkg.json +++ b/ports/d3dx12/vcpkg.json @@ -1,6 +1,6 @@ { "name": "d3dx12", - "version-string": "12aug2020", + "version-string": "2020-09-05", "description": "The D3D12 Helper Library", "homepage": "https://github.com/microsoft/DirectX-Graphics-Samples/tree/master/Libraries/D3DX12" } From 9eec6965a5d056f05150d4cf38231311b69dc911 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A9rill=20T=C3=A9terel?= <59962715+mteterel@users.noreply.github.com> Date: Mon, 7 Sep 2020 10:01:04 +0200 Subject: [PATCH 3/6] Update portfile.cmake Use the correct d3dx12.h that does not require the very latest Windows SDK --- ports/d3dx12/portfile.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/d3dx12/portfile.cmake b/ports/d3dx12/portfile.cmake index a9874ba88a6004..e65541f09bae04 100644 --- a/ports/d3dx12/portfile.cmake +++ b/ports/d3dx12/portfile.cmake @@ -1,8 +1,8 @@ # Header-only library vcpkg_download_distfile(D3DX12_H - URLS "https://raw.githubusercontent.com/microsoft/DirectX-Graphics-Samples/master/Libraries/D3DX12/d3dx12.h" + URLS "https://raw.githubusercontent.com/walbourn/directx-vs-templates/master/d3d12game_win32_dr/d3dx12.h" FILENAME "d3dx12.h" - SHA512 "e41936bec06db9e22e953b31de418981343d5a4df4979d359a4c427d90f58ccee41fba73b9b0b8251d957dbdf4f9b7730ee11846f59f23636b862685a0fc21dc" + SHA512 "58a1f5060c82c2769987592d6f20d8c8d86032505740492b24f69c88b75f0814d3f18d5c3ae7c71c54bfe5eeb7f844ee623ce73376a676986db0643589aab62b" ) file(INSTALL ${D3DX12_H} DESTINATION ${CURRENT_PACKAGES_DIR}/include/) From b2e61854929f54a34d431d1ebe9b1407677665d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A9rill=20T=C3=A9terel?= <59962715+mteterel@users.noreply.github.com> Date: Wed, 9 Sep 2020 22:29:08 +0200 Subject: [PATCH 4/6] Apply suggestions from code review Co-authored-by: Robert Schumacher --- ports/d3dx12/portfile.cmake | 2 +- ports/d3dx12/vcpkg.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/d3dx12/portfile.cmake b/ports/d3dx12/portfile.cmake index e65541f09bae04..13ff34d8b1f98e 100644 --- a/ports/d3dx12/portfile.cmake +++ b/ports/d3dx12/portfile.cmake @@ -1,6 +1,6 @@ # Header-only library vcpkg_download_distfile(D3DX12_H - URLS "https://raw.githubusercontent.com/walbourn/directx-vs-templates/master/d3d12game_win32_dr/d3dx12.h" + URLS "https://raw.githubusercontent.com/walbourn/directx-vs-templates/may2020/d3d12game_win32_dr/d3dx12.h" FILENAME "d3dx12.h" SHA512 "58a1f5060c82c2769987592d6f20d8c8d86032505740492b24f69c88b75f0814d3f18d5c3ae7c71c54bfe5eeb7f844ee623ce73376a676986db0643589aab62b" ) diff --git a/ports/d3dx12/vcpkg.json b/ports/d3dx12/vcpkg.json index a8721e71cb83a7..c4565a55ae9212 100644 --- a/ports/d3dx12/vcpkg.json +++ b/ports/d3dx12/vcpkg.json @@ -1,6 +1,6 @@ { "name": "d3dx12", - "version-string": "2020-09-05", + "version-string": "may2020", "description": "The D3D12 Helper Library", "homepage": "https://github.com/microsoft/DirectX-Graphics-Samples/tree/master/Libraries/D3DX12" } From 677b80aadc28bc1018a453a2af9a90f341038151 Mon Sep 17 00:00:00 2001 From: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> Date: Fri, 11 Sep 2020 11:04:04 +0800 Subject: [PATCH 5/6] Update ports/d3dx12/portfile.cmake --- ports/d3dx12/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/d3dx12/portfile.cmake b/ports/d3dx12/portfile.cmake index 13ff34d8b1f98e..159364afd5c766 100644 --- a/ports/d3dx12/portfile.cmake +++ b/ports/d3dx12/portfile.cmake @@ -2,7 +2,7 @@ vcpkg_download_distfile(D3DX12_H URLS "https://raw.githubusercontent.com/walbourn/directx-vs-templates/may2020/d3d12game_win32_dr/d3dx12.h" FILENAME "d3dx12.h" - SHA512 "58a1f5060c82c2769987592d6f20d8c8d86032505740492b24f69c88b75f0814d3f18d5c3ae7c71c54bfe5eeb7f844ee623ce73376a676986db0643589aab62b" + SHA512 "829b72ddf861652bd96518b7d54f7a103c95b4434ec022e1551fb085e4dfc8f804e01ccdb4677e3f64367553c56d35291b305e10c2ea6186ddadaaa071c6d7a2" ) file(INSTALL ${D3DX12_H} DESTINATION ${CURRENT_PACKAGES_DIR}/include/) From 8cdfaf0970b430094b51e5dacb2aece6e1ffcd4d Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 11 Sep 2020 12:37:25 -0700 Subject: [PATCH 6/6] [d3dx12] Download license file --- ports/d3dx12/portfile.cmake | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/ports/d3dx12/portfile.cmake b/ports/d3dx12/portfile.cmake index 159364afd5c766..3f25d6d5c2164d 100644 --- a/ports/d3dx12/portfile.cmake +++ b/ports/d3dx12/portfile.cmake @@ -1,9 +1,15 @@ -# Header-only library +set(VERSION may2020) + vcpkg_download_distfile(D3DX12_H - URLS "https://raw.githubusercontent.com/walbourn/directx-vs-templates/may2020/d3d12game_win32_dr/d3dx12.h" - FILENAME "d3dx12.h" + URLS "https://raw.githubusercontent.com/walbourn/directx-vs-templates/${VERSION}/d3d12game_win32_dr/d3dx12.h" + FILENAME "directx-vs-templates-${VERSION}-d3dx12.h" SHA512 "829b72ddf861652bd96518b7d54f7a103c95b4434ec022e1551fb085e4dfc8f804e01ccdb4677e3f64367553c56d35291b305e10c2ea6186ddadaaa071c6d7a2" ) +vcpkg_download_distfile(LICENSE + URLS "https://raw.githubusercontent.com/walbourn/directx-vs-templates/${VERSION}/LICENSE" + FILENAME "directx-vs-templates-${VERSION}-LICENSE" + SHA512 "f1c9c9b83627d00ec98c9e54c4b708716731e4b0b27f38e95d21b01f8fe4e1f27eeade5d802f93caa83ede17610411ca082ea1ce79150c372f3abdceaaa9a4a3" +) -file(INSTALL ${D3DX12_H} DESTINATION ${CURRENT_PACKAGES_DIR}/include/) -file(WRITE "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" "") +file(INSTALL "${D3DX12_H}" DESTINATION ${CURRENT_PACKAGES_DIR}/include RENAME d3dx12.h) +file(INSTALL "${LICENSE}" DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)