2023-09-08 04:10:01 +08:00
|
|
|
set(DIRECTXTEX_TAG sept2023)
|
2022-11-01 04:15:33 +08:00
|
|
|
|
2020-12-29 09:28:53 +08:00
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
|
|
|
2020-06-18 05:48:39 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO Microsoft/DirectXTex
|
2023-04-06 07:30:02 +08:00
|
|
|
REF ${DIRECTXTEX_TAG}
|
2023-09-08 04:10:01 +08:00
|
|
|
SHA512 b72941496bcd3193409799905cd6b6d0ce79009b222a589257062f830c2ccc16a97166da92ea59a7954d0f60d1fcd704cdb2cb7449697009f9ddeb00e27c4fb8
|
[directxmath, directxtex, directxmesh, directxtk, directxtk12, uvatlas] ports updated (#23332)
* [directxmath, directxmesh, directxtex, directxtk, directxtk12, uvatlas] ports updated to February 2022 release
* Update baseline
* Updated directxmath to use non-deprecated functions
* Refresh baseline
* Updated for master-to-main rename
* Refresh baseline
* Remove en-us specific doc link
* Refresh version baseline
2022-03-03 06:58:20 +08:00
|
|
|
HEAD_REF main
|
2020-10-14 04:40:52 +08:00
|
|
|
)
|
2020-06-18 05:48:39 +08:00
|
|
|
|
2020-10-14 04:40:52 +08:00
|
|
|
vcpkg_check_features(
|
|
|
|
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
2020-10-23 15:35:28 +08:00
|
|
|
FEATURES
|
2023-02-14 00:38:42 +08:00
|
|
|
dx11 BUILD_DX11
|
2020-10-23 15:35:28 +08:00
|
|
|
dx12 BUILD_DX12
|
|
|
|
openexr ENABLE_OPENEXR_SUPPORT
|
2023-01-05 06:44:07 +08:00
|
|
|
spectre ENABLE_SPECTRE_MITIGATION
|
2023-04-06 07:30:02 +08:00
|
|
|
tools BUILD_TOOLS
|
2020-10-14 04:40:52 +08:00
|
|
|
)
|
|
|
|
|
2023-09-08 04:10:01 +08:00
|
|
|
set(EXTRA_OPTIONS -DBUILD_SAMPLE=OFF -DBUILD_TESTING=OFF)
|
|
|
|
|
2023-08-01 04:03:54 +08:00
|
|
|
if(VCPKG_TARGET_IS_WINDOWS AND NOT (VCPKG_TARGET_IS_XBOX OR VCPKG_TARGET_IS_MINGW) AND NOT "dx12" IN_LIST FEATURES)
|
2023-09-08 04:10:01 +08:00
|
|
|
list(APPEND EXTRA_OPTIONS "-DCMAKE_DISABLE_FIND_PACKAGE_directx-headers=TRUE")
|
2023-08-01 04:03:54 +08:00
|
|
|
endif()
|
|
|
|
|
2023-02-14 00:38:42 +08:00
|
|
|
if(VCPKG_TARGET_IS_MINGW AND ("dx11" IN_LIST FEATURES))
|
|
|
|
message(NOTICE "Building ${PORT} for MinGW requires the HLSL Compiler fxc.exe also be in the PATH. See https://aka.ms/windowssdk.")
|
|
|
|
endif()
|
|
|
|
|
2021-01-13 12:01:37 +08:00
|
|
|
if (VCPKG_HOST_IS_LINUX)
|
|
|
|
message(WARNING "Build ${PORT} requires GCC version 9 or later")
|
|
|
|
endif()
|
|
|
|
|
2021-10-16 10:34:23 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2023-09-08 04:10:01 +08:00
|
|
|
OPTIONS ${FEATURE_OPTIONS} ${EXTRA_OPTIONS}
|
2020-06-18 05:48:39 +08:00
|
|
|
)
|
|
|
|
|
2021-10-16 10:34:23 +08:00
|
|
|
vcpkg_cmake_install()
|
2022-08-02 03:53:52 +08:00
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH share/directxtex)
|
2020-10-14 04:40:52 +08:00
|
|
|
|
2023-04-06 07:30:02 +08:00
|
|
|
if("tools" IN_LIST FEATURES)
|
2020-12-29 09:28:53 +08:00
|
|
|
|
|
|
|
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/directxtex/")
|
|
|
|
|
2023-04-06 07:30:02 +08:00
|
|
|
if((VCPKG_TARGET_ARCHITECTURE STREQUAL x64) AND (NOT ("openexr" IN_LIST FEATURES)))
|
|
|
|
|
|
|
|
vcpkg_download_distfile(
|
|
|
|
TEXASSEMBLE_EXE
|
|
|
|
URLS "https://github.com/Microsoft/DirectXTex/releases/download/${DIRECTXTEX_TAG}/texassemble.exe"
|
|
|
|
FILENAME "texassemble-${DIRECTXTEX_TAG}.exe"
|
2023-09-08 04:10:01 +08:00
|
|
|
SHA512 30d607e0e0a47917731ef5acebb5d4d269b73bf21120cb976e7bf605f7f5941cb23f63a317fb3d4171f0dce1526f8dd4365e9c2f9b1a6503c320b1f88156acc4
|
2023-04-06 07:30:02 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_download_distfile(
|
|
|
|
TEXCONV_EXE
|
|
|
|
URLS "https://github.com/Microsoft/DirectXTex/releases/download/${DIRECTXTEX_TAG}/texconv.exe"
|
|
|
|
FILENAME "texconv-${DIRECTXTEX_TAG}.exe"
|
2023-09-08 04:10:01 +08:00
|
|
|
SHA512 43103276b6a8be23c7b429f089f71df5338b8ef32a2f3fe20492d5294886ddbe9a170c6bc1ead7a2da2179ed8e4828262d7072f136b6586af31d2f3249dff97a
|
2023-04-06 07:30:02 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_download_distfile(
|
|
|
|
TEXDIAG_EXE
|
|
|
|
URLS "https://github.com/Microsoft/DirectXTex/releases/download/${DIRECTXTEX_TAG}/texdiag.exe"
|
|
|
|
FILENAME "texdiag-${DIRECTXTEX_TAG}.exe"
|
2023-09-08 04:10:01 +08:00
|
|
|
SHA512 915aa492b3db2a9787492c8e9ae1b51b175db81b38bca73cd5de2ab815308a5d4e63fb584d02f178939fb816c604996e5036b310b4555ecdc0d1e0640aef7ee0
|
2023-04-06 07:30:02 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
file(INSTALL
|
|
|
|
"${TEXASSEMBLE_EXE}"
|
|
|
|
"${TEXCONV_EXE}"
|
|
|
|
"${TEXDIAG_EXE}"
|
|
|
|
DESTINATION "${CURRENT_PACKAGES_DIR}/tools/directxtex/")
|
|
|
|
|
|
|
|
file(RENAME "${CURRENT_PACKAGES_DIR}/tools/directxtex/texassemble-${DIRECTXTEX_TAG}.exe" "${CURRENT_PACKAGES_DIR}/tools/directxtex/texassemble.exe")
|
|
|
|
file(RENAME "${CURRENT_PACKAGES_DIR}/tools/directxtex/texconv-${DIRECTXTEX_TAG}.exe" "${CURRENT_PACKAGES_DIR}/tools/directxtex/texconv.exe")
|
|
|
|
file(RENAME "${CURRENT_PACKAGES_DIR}/tools/directxtex/texdiag-${DIRECTXTEX_TAG}.exe" "${CURRENT_PACKAGES_DIR}/tools/directxtex/texadiag.exe")
|
2021-01-16 07:24:06 +08:00
|
|
|
|
2023-04-06 07:30:02 +08:00
|
|
|
elseif((VCPKG_TARGET_ARCHITECTURE STREQUAL arm64) AND (NOT ("openexr" IN_LIST FEATURES)))
|
2021-04-10 00:54:41 +08:00
|
|
|
|
2023-04-06 07:30:02 +08:00
|
|
|
vcpkg_download_distfile(
|
|
|
|
TEXASSEMBLE_EXE
|
|
|
|
URLS "https://github.com/Microsoft/DirectXTex/releases/download/${DIRECTXTEX_TAG}/texassemble_arm64.exe"
|
|
|
|
FILENAME "texassemble-${DIRECTXTEX_TAG}-arm64.exe"
|
2023-09-08 04:10:01 +08:00
|
|
|
SHA512 c2152d5644798c4f5fa929a889e68ae5b6545dfdb3251f066406c1f66c223756ace1744314ec459637ca1b39923ad8bfd34f0bf906c84b7e7d6d7114833b7a84
|
2023-04-06 07:30:02 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_download_distfile(
|
|
|
|
TEXCONV_EXE
|
|
|
|
URLS "https://github.com/Microsoft/DirectXTex/releases/download/${DIRECTXTEX_TAG}/texconv_arm64.exe"
|
|
|
|
FILENAME "texconv-${DIRECTXTEX_TAG}-arm64.exe"
|
2023-09-08 04:10:01 +08:00
|
|
|
SHA512 15901617f1a2ac94f1eec3b287758e50bf0fad6532940345fd9d13c34372acd27d10f8ba3277f21163f991082dbff14506cb4d7068179b5807755d818f98e27d
|
2023-04-06 07:30:02 +08:00
|
|
|
)
|
2021-04-10 00:54:41 +08:00
|
|
|
|
2023-04-06 07:30:02 +08:00
|
|
|
vcpkg_download_distfile(
|
|
|
|
TEXDIAG_EXE
|
|
|
|
URLS "https://github.com/Microsoft/DirectXTex/releases/download/${DIRECTXTEX_TAG}/texdiag_arm64.exe"
|
|
|
|
FILENAME "texdiag-${DIRECTXTEX_TAG}-arm64.exe"
|
2023-09-08 04:10:01 +08:00
|
|
|
SHA512 cc110a34428a7a7694f890bae6f68d001c2e8bcb85edfe335d9cad299e0205ef2bd786392cd391681ca1f1c0043b869c424a705a182466230f6f683b77c47c3e
|
2021-04-10 00:54:41 +08:00
|
|
|
)
|
|
|
|
|
2023-04-06 07:30:02 +08:00
|
|
|
file(INSTALL
|
|
|
|
"${TEXASSEMBLE_EXE}"
|
|
|
|
"${TEXCONV_EXE}"
|
|
|
|
"${TEXDIAG_EXE}"
|
|
|
|
DESTINATION "${CURRENT_PACKAGES_DIR}/tools/directxtex/")
|
|
|
|
|
|
|
|
file(RENAME "${CURRENT_PACKAGES_DIR}/tools/directxtex/texassemble-${DIRECTXTEX_TAG}-arm64.exe" "${CURRENT_PACKAGES_DIR}/tools/directxtex/texassemble.exe")
|
|
|
|
file(RENAME "${CURRENT_PACKAGES_DIR}/tools/directxtex/texconv-${DIRECTXTEX_TAG}-arm64.exe" "${CURRENT_PACKAGES_DIR}/tools/directxtex/texconv.exe")
|
|
|
|
file(RENAME "${CURRENT_PACKAGES_DIR}/tools/directxtex/texdiag-${DIRECTXTEX_TAG}-arm64.exe" "${CURRENT_PACKAGES_DIR}/tools/directxtex/texadiag.exe")
|
|
|
|
|
|
|
|
elseif("dx11" IN_LIST FEATURES)
|
|
|
|
|
|
|
|
vcpkg_copy_tools(
|
|
|
|
TOOL_NAMES texassemble texconv texdiag
|
|
|
|
SEARCH_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bin/CMake"
|
|
|
|
)
|
|
|
|
|
|
|
|
endif()
|
2020-06-18 05:48:39 +08:00
|
|
|
endif()
|
|
|
|
|
2020-12-29 09:28:53 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
|
[directxmesh, directxtex, directxtk, uvatlas, dxut, effects11] June 2023 update (#32033)
* [directxmesh, directxtex, directxtk, uvatlas, dxut, effects11] Update for June 13, 2023 release
* Minor format fix
* Update baseline
* Upstream fixes to CMake targets dependency handling
* Update baseline
2023-06-22 13:39:47 +08:00
|
|
|
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
2023-05-02 06:25:18 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|