[directx-dxc] port update for March 1, 2023 release (#29987)

* [directx-dxc] port update for March 1, 2023 release

* Update port for linux

* Update baseline
This commit is contained in:
Chuck Walbourn 2023-03-06 15:24:41 -08:00 committed by GitHub
parent badb58a716
commit 03e6871f8b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 42 additions and 34 deletions

View File

@ -1,27 +1,30 @@
set(VCPKG_POLICY_DLLS_IN_STATIC_LIBRARY enabled) set(VCPKG_POLICY_DLLS_IN_STATIC_LIBRARY enabled)
set(DIRECTX_DXC_TAG v1.7.2212.1)
set(DIRECTX_DXC_VERSION 2023_03_01)
if (NOT VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") if (NOT VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
message(STATUS "Note: ${PORT} always requires dynamic library linkage at runtime.") message(STATUS "Note: ${PORT} always requires dynamic library linkage at runtime.")
endif() endif()
if (VCPKG_TARGET_IS_LINUX) if (VCPKG_TARGET_IS_LINUX)
vcpkg_download_distfile(ARCHIVE vcpkg_download_distfile(ARCHIVE
URLS "https://github.com/microsoft/DirectXShaderCompiler/releases/download/v1.7.2212/linux_dxc_2022_12_16.tar.gz" URLS "https://github.com/microsoft/DirectXShaderCompiler/releases/download/${DIRECTX_DXC_TAG}/linux_dxc_${DIRECTX_DXC_VERSION}.x86_64.tar.gz"
FILENAME "linux_dxc_2022_12_16.tar.gz" FILENAME "linux_dxc_${DIRECTX_DXC_VERSION}.tar.gz"
SHA512 396d16a8a201bfad1531a984e78d59b918fac062a707697c27acb43257755a16899b7c4b68e2f5e35fbdf37c984b0c6029160be91fa37b32c0b4ea2d1c25277e SHA512 66b421377a92b8ebb700f5df30b538393b826e3f12bb3478430dbbb1f899e435f6ed8c442a38ef9218d6f55d6e5c0441bd8a766bc1960df278567e575f8b969c
) )
else() else()
vcpkg_download_distfile(ARCHIVE vcpkg_download_distfile(ARCHIVE
URLS "https://github.com/microsoft/DirectXShaderCompiler/releases/download/v1.7.2212/dxc_2022_12_16.zip" URLS "https://github.com/microsoft/DirectXShaderCompiler/releases/download/${DIRECTX_DXC_TAG}/dxc_${DIRECTX_DXC_VERSION}.zip"
FILENAME "dxc_2022_12_16.zip" FILENAME "dxc_${DIRECTX_DXC_VERSION}.zip"
SHA512 b4885bdec0db5b6385d4a8c06617051b1777002c3f39bfcf4c9d2c95e9491634f0e77a18375bf5be5152136c5f509a94e3b4a9c56d2e844316e8b760b6acaf68 SHA512 9c348d24f406c5072a57961184d5f6c6d6483666bbb2f18dd31a9c666249e1b83e6c035dcdbdd126d084e4a5cbe0973cd823df97ac9b1efc715c15ce5691b27a
) )
endif() endif()
vcpkg_download_distfile( vcpkg_download_distfile(
LICENSE_TXT LICENSE_TXT
URLS "https://raw.githubusercontent.com/microsoft/DirectXShaderCompiler/v1.7.2212/LICENSE.TXT" URLS "https://raw.githubusercontent.com/microsoft/DirectXShaderCompiler/${DIRECTX_DXC_TAG}/LICENSE.TXT"
FILENAME "LICENSE.v1.7.2212" FILENAME "LICENSE.${DIRECTX_DXC_VERSION}"
SHA512 7589f152ebc3296dca1c73609a2a23a911b8fc0029731268a6151710014d82005a868c85c8249219f060f64ab1ddecdddff5ed6ea34ff509f63ea3e42bbbf47e SHA512 7589f152ebc3296dca1c73609a2a23a911b8fc0029731268a6151710014d82005a868c85c8249219f060f64ab1ddecdddff5ed6ea34ff509f63ea3e42bbbf47e
) )
@ -31,37 +34,25 @@ vcpkg_extract_source_archive(
NO_REMOVE_ONE_LEVEL NO_REMOVE_ONE_LEVEL
) )
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") if (VCPKG_TARGET_IS_LINUX)
set(DXC_ARCH arm64) file(INSTALL
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") "${PACKAGE_PATH}/include/dxc/dxcapi.h"
set(DXC_ARCH x86) "${PACKAGE_PATH}/include/dxc/dxcerrors.h"
else() "${PACKAGE_PATH}/include/dxc/dxcisense.h"
set(DXC_ARCH x64) "${PACKAGE_PATH}/include/dxc/WinAdapter.h"
endif()
file(INSTALL
"${PACKAGE_PATH}/inc/dxcapi.h"
"${PACKAGE_PATH}/inc/dxcerrors.h"
"${PACKAGE_PATH}/inc/dxcisense.h"
DESTINATION "${CURRENT_PACKAGES_DIR}/include/${PORT}") DESTINATION "${CURRENT_PACKAGES_DIR}/include/${PORT}")
if (VCPKG_TARGET_IS_LINUX)
# Work around for https://github.com/microsoft/DirectXShaderCompiler/issues/4918
file(COPY "${PACKAGE_PATH}/inc/WinAdapter.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/${PORT}/dxc/Support")
file(COPY "${PACKAGE_PATH}/inc/WinAdapter.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/${PORT}/Support")
file(INSTALL file(INSTALL
"${PACKAGE_PATH}/lib/${DXC_ARCH}/libdxcompiler.so" "${PACKAGE_PATH}/lib/libdxcompiler.so"
"${PACKAGE_PATH}/lib/${DXC_ARCH}/libdxil.so" "${PACKAGE_PATH}/lib/libdxil.so"
DESTINATION "${CURRENT_PACKAGES_DIR}/lib") DESTINATION "${CURRENT_PACKAGES_DIR}/lib")
file(INSTALL file(INSTALL
"${PACKAGE_PATH}/lib/${DXC_ARCH}/libdxcompiler.so" "${PACKAGE_PATH}/lib/libdxcompiler.so"
"${PACKAGE_PATH}/lib/${DXC_ARCH}/libdxil.so" "${PACKAGE_PATH}/lib/libdxil.so"
DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib") DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib")
file(INSTALL file(INSTALL
"${PACKAGE_PATH}/bin/${DXC_ARCH}/dxc" "${PACKAGE_PATH}/bin/dxc"
DESTINATION "${CURRENT_PACKAGES_DIR}/bin") DESTINATION "${CURRENT_PACKAGES_DIR}/bin")
set(dll_name "libdxcompiler.so") set(dll_name "libdxcompiler.so")
@ -70,8 +61,20 @@ if (VCPKG_TARGET_IS_LINUX)
set(tool_path "bin/dxc") set(tool_path "bin/dxc")
else() else()
# VCPKG_TARGET_IS_WINDOWS # VCPKG_TARGET_IS_WINDOWS
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
set(DXC_ARCH arm64)
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
set(DXC_ARCH x86)
else()
set(DXC_ARCH x64)
endif()
file(INSTALL "${PACKAGE_PATH}/inc/d3d12shader.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/${PORT}") file(INSTALL
"${PACKAGE_PATH}/inc/dxcapi.h"
"${PACKAGE_PATH}/inc/dxcerrors.h"
"${PACKAGE_PATH}/inc/dxcisense.h"
"${PACKAGE_PATH}/inc/d3d12shader.h"
DESTINATION "${CURRENT_PACKAGES_DIR}/include/${PORT}")
file(INSTALL "${PACKAGE_PATH}/lib/${DXC_ARCH}/dxcompiler.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/lib") file(INSTALL "${PACKAGE_PATH}/lib/${DXC_ARCH}/dxcompiler.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/lib")
file(INSTALL "${PACKAGE_PATH}/lib/${DXC_ARCH}/dxcompiler.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib") file(INSTALL "${PACKAGE_PATH}/lib/${DXC_ARCH}/dxcompiler.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib")

View File

@ -1,6 +1,6 @@
{ {
"name": "directx-dxc", "name": "directx-dxc",
"version-date": "2022-12-16", "version-date": "2022-03-01",
"description": "DirectX Shader Compiler (LLVM/Clang)", "description": "DirectX Shader Compiler (LLVM/Clang)",
"homepage": "https://github.com/microsoft/DirectXShaderCompiler", "homepage": "https://github.com/microsoft/DirectXShaderCompiler",
"documentation": "https://github.com/microsoft/DirectXShaderCompiler/wiki", "documentation": "https://github.com/microsoft/DirectXShaderCompiler/wiki",

View File

@ -2021,7 +2021,7 @@
"port-version": 0 "port-version": 0
}, },
"directx-dxc": { "directx-dxc": {
"baseline": "2022-12-16", "baseline": "2022-03-01",
"port-version": 0 "port-version": 0
}, },
"directx-headers": { "directx-headers": {

View File

@ -1,5 +1,10 @@
{ {
"versions": [ "versions": [
{
"git-tree": "20d76f8fd2bb7b07fa76370b7198e0ce8f7b316b",
"version-date": "2022-03-01",
"port-version": 0
},
{ {
"git-tree": "5d5118c4217f6ec298f348d694eb02b00558ef07", "git-tree": "5d5118c4217f6ec298f348d694eb02b00558ef07",
"version-date": "2022-12-16", "version-date": "2022-12-16",