2024-11-04 09:18:35 +08:00
|
|
|
set(DIRECTXTEX_TAG oct2024)
|
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}
|
2024-11-04 09:18:35 +08:00
|
|
|
SHA512 4ac9307ab6e36aa727afa5bd5bb945fb431c89fa01c9c8283eebf512707acfb15a0d7cd84f72349d4271b0eef2e13bca38a38226c1afafd8f1e36b38c1c4b07f
|
[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
|
2024-11-04 09:18:35 +08:00
|
|
|
PATCHES
|
|
|
|
FixStdByteAndCMake.patch
|
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
|
2024-03-12 11:16:53 +08:00
|
|
|
jpeg ENABLE_LIBJPEG_SUPPORT
|
2020-10-23 15:35:28 +08:00
|
|
|
openexr ENABLE_OPENEXR_SUPPORT
|
2024-03-12 11:16:53 +08:00
|
|
|
png ENABLE_LIBPNG_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
|
|
|
)
|
|
|
|
|
2024-02-27 16:24:49 +08:00
|
|
|
set(EXTRA_OPTIONS -DBUILD_SAMPLE=OFF)
|
2023-09-08 04:10:01 +08:00
|
|
|
|
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))
|
2024-03-12 11:16:53 +08:00
|
|
|
message(NOTICE "Building ${PORT} for MinGW requires the HLSL Compiler fxc.exe also be in the PATH. See https://aka.ms/windowssdk.")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if("xbox" IN_LIST FEATURES)
|
|
|
|
if((NOT (DEFINED DIRECTXTEX_XBOX_CONSOLE_TARGET)) OR (DIRECTXTEX_XBOX_CONSOLE_TARGET STREQUAL "scarlett"))
|
|
|
|
list(APPEND FEATURE_OPTIONS "-DBUILD_XBOX_EXTS_SCARLETT=ON")
|
|
|
|
message(NOTICE "Building ${PORT} with Xbox Series X|S extensions")
|
|
|
|
elseif(DIRECTXTEX_XBOX_CONSOLE_TARGET STREQUAL "xboxone")
|
|
|
|
list(APPEND FEATURE_OPTIONS "-DBUILD_XBOX_EXTS_XBOXONE=ON")
|
|
|
|
message(NOTICE "Building ${PORT} with Xbox One extensions")
|
|
|
|
else()
|
|
|
|
message(FATAL_ERROR "The triplet variable DIRECTXTEX_XBOX_CONSOLE_TARGET should be set to 'xboxone' or 'scarlett'.")
|
|
|
|
endif()
|
2023-02-14 00:38:42 +08:00
|
|
|
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()
|
2024-01-03 06:37:52 +08:00
|
|
|
vcpkg_fixup_pkgconfig()
|
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/")
|
|
|
|
|
2024-03-12 11:16:53 +08:00
|
|
|
if((VCPKG_TARGET_ARCHITECTURE STREQUAL x64) AND (NOT (("openexr" IN_LIST FEATURES) OR ("xbox" IN_LIST FEATURES))))
|
2023-04-06 07:30:02 +08:00
|
|
|
|
|
|
|
vcpkg_download_distfile(
|
|
|
|
TEXASSEMBLE_EXE
|
|
|
|
URLS "https://github.com/Microsoft/DirectXTex/releases/download/${DIRECTXTEX_TAG}/texassemble.exe"
|
|
|
|
FILENAME "texassemble-${DIRECTXTEX_TAG}.exe"
|
2024-11-04 09:18:35 +08:00
|
|
|
SHA512 bb3c45d35305a56b80035bd7c076cd0000461cb37a5cd9495ac8f8a1647967fb6ecb02245336356674829f179ef05330d5aa9e768637e93b9db587d7eb684dfe
|
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"
|
2024-11-04 09:18:35 +08:00
|
|
|
SHA512 6376ee91dca0b53c043e1e86ec56f418029591885dd9fd49f8e932aa635e6668d430aeb30b497daa4e8c1f02ac42f7dc901ebec107d8bc1e611c9a0ec8747029
|
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"
|
2024-11-04 09:18:35 +08:00
|
|
|
SHA512 31261ceefc17ce30c7f21dff961bfe03b2dc65619f60c64891a5fc56847cd7468a6629c36b1fcbf4c6f967232ad88eb85cf5c2ea874084dfe0d8da4ffabc12c8
|
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
|
|
|
|
2024-09-06 15:13:47 +08:00
|
|
|
elseif(((VCPKG_TARGET_ARCHITECTURE STREQUAL arm64) OR (VCPKG_TARGET_ARCHITECTURE STREQUAL arm64ec)) 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"
|
2024-11-04 09:18:35 +08:00
|
|
|
SHA512 48b629b7aead482c0dc96c2fcfb28d534076d62dc77ce94256ad52df48596c1993645900873bf0dfd3d888087b423c350ba3f420b1305ef2ed7a43eafecfb523
|
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"
|
2024-11-04 09:18:35 +08:00
|
|
|
SHA512 53f319be7e739d9e3addc2e86648022ec802315a94c600eb6886a4474232aa25de0c9fb8d72868d2871d29eb36ee1dd6a186094edb6d9ab8f249b4eb4849a10c
|
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"
|
2024-11-04 09:18:35 +08:00
|
|
|
SHA512 638b6b8443767ca390efdfdb8e4e8a655f0cc370a81b946678414481a6c3fc0c431a7082d08206fa86bc4ccf9c8b0027a427d483474a8c3d1ff0a030011779f7
|
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
|
2024-02-27 16:24:49 +08:00
|
|
|
SEARCH_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bin"
|
2023-04-06 07:30:02 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
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")
|