2023-05-02 06:25:18 +08:00
|
|
|
set(DIRECTXTEX_TAG apr2023)
|
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-05-02 06:25:18 +08:00
|
|
|
SHA512 112e25a61ff04dea82e0e6c695df8bf6a480008a2f6f68239b7393696f960b5fa5e42b93ba2043c652c34565f9b0ac9b3ac855204a0dc5f9b62e147ad5bacfbc
|
[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-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-04-22 12:29:38 +08:00
|
|
|
OPTIONS ${FEATURE_OPTIONS} -DBUILD_SAMPLE=OFF -DBUILD_TESTING=OFF
|
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-05-02 06:25:18 +08:00
|
|
|
SHA512 758c3a99befca251ad0f05e6d9467dffef75868e541c027960c007406e55d10dbf5b09d4c4cf4f013a8c188d7a6a6dafecfd146d19a12ad520bfd47378adc331
|
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-05-02 06:25:18 +08:00
|
|
|
SHA512 a652debd8b6204fdf35bac968e6fcc3815202b6a858f2999566c4c5151574b7bc5b0a190c172f91b2bdea75d4873423b089894c640928807ee43dac2ecaf7cfd
|
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-05-02 06:25:18 +08:00
|
|
|
SHA512 60b5b2d07ca686964b39f21f6433cb11ac5da009dee18c8c0fee6cf60ccaa531056f2efafe14096eaaf530f7293fd395f46c7d9509013f4ff08f0b42a41dc69e
|
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-05-02 06:25:18 +08:00
|
|
|
SHA512 9365a3b15a17ec42bac19bf48a2bfba524191347e845ca0d79adf94771cc6f3d608ac0c41654cf3eb76e32ccce4f5dc3fd309eb7d6420669dc2f8015a71555f7
|
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-05-02 06:25:18 +08:00
|
|
|
SHA512 b479b725b78f2acf5a22958af85ce04eeb62bc25ea5eaaa7c2bc10b7161d2be103e13112c2f55e8da13ce260f8a62e7cfb951d0c7cc08cb23f3aafe4ebe8fec7
|
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-05-02 06:25:18 +08:00
|
|
|
SHA512 9226643fd9ec57de8f7d57d225c0d07d6f250975c1e04c15cec078678e1a24c3cafa8483138b7966015e4fdc7a53bd53043376a9ae157e98876d842f2ede9d37
|
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")
|
|
|
|
|
2023-05-02 06:25:18 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|