2024-06-07 02:18:05 -07:00
|
|
|
set(DIRECTXTEX_TAG jun2024)
|
2022-10-31 13:15:33 -07:00
|
|
|
|
2020-12-28 17:28:53 -08:00
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
|
|
|
2020-06-17 23:48:39 +02:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO Microsoft/DirectXTex
|
2023-04-05 16:30:02 -07:00
|
|
|
REF ${DIRECTXTEX_TAG}
|
2024-06-07 02:18:05 -07:00
|
|
|
SHA512 5ad160d4279c4b74c5ad29c7d830972ad8b9f8b42c3c0d3d889cc6c98f97c9285cd4c753ffcb88ed23cb40786071ea50917fd273b653f55f497e6ea10181c560
|
[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-02 14:58:20 -08:00
|
|
|
HEAD_REF main
|
2020-10-13 22:40:52 +02:00
|
|
|
)
|
2020-06-17 23:48:39 +02:00
|
|
|
|
2020-10-13 22:40:52 +02:00
|
|
|
vcpkg_check_features(
|
|
|
|
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
2020-10-23 09:35:28 +02:00
|
|
|
FEATURES
|
2023-02-13 08:38:42 -08:00
|
|
|
dx11 BUILD_DX11
|
2020-10-23 09:35:28 +02:00
|
|
|
dx12 BUILD_DX12
|
2024-03-11 20:16:53 -07:00
|
|
|
jpeg ENABLE_LIBJPEG_SUPPORT
|
2020-10-23 09:35:28 +02:00
|
|
|
openexr ENABLE_OPENEXR_SUPPORT
|
2024-03-11 20:16:53 -07:00
|
|
|
png ENABLE_LIBPNG_SUPPORT
|
2023-01-04 14:44:07 -08:00
|
|
|
spectre ENABLE_SPECTRE_MITIGATION
|
2023-04-05 16:30:02 -07:00
|
|
|
tools BUILD_TOOLS
|
2020-10-13 22:40:52 +02:00
|
|
|
)
|
|
|
|
|
2024-02-27 00:24:49 -08:00
|
|
|
set(EXTRA_OPTIONS -DBUILD_SAMPLE=OFF)
|
2023-09-07 13:10:01 -07:00
|
|
|
|
2023-07-31 22:03:54 +02: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-07 13:10:01 -07:00
|
|
|
list(APPEND EXTRA_OPTIONS "-DCMAKE_DISABLE_FIND_PACKAGE_directx-headers=TRUE")
|
2023-07-31 22:03:54 +02:00
|
|
|
endif()
|
|
|
|
|
2023-02-13 08:38:42 -08:00
|
|
|
if(VCPKG_TARGET_IS_MINGW AND ("dx11" IN_LIST FEATURES))
|
2024-03-11 20:16:53 -07: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-13 08:38:42 -08:00
|
|
|
endif()
|
|
|
|
|
2021-01-12 20:01:37 -08:00
|
|
|
if (VCPKG_HOST_IS_LINUX)
|
|
|
|
message(WARNING "Build ${PORT} requires GCC version 9 or later")
|
|
|
|
endif()
|
|
|
|
|
2021-10-15 19:34:23 -07:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2023-09-07 13:10:01 -07:00
|
|
|
OPTIONS ${FEATURE_OPTIONS} ${EXTRA_OPTIONS}
|
2020-06-17 23:48:39 +02:00
|
|
|
)
|
|
|
|
|
2021-10-15 19:34:23 -07:00
|
|
|
vcpkg_cmake_install()
|
2024-01-02 14:37:52 -08:00
|
|
|
vcpkg_fixup_pkgconfig()
|
2022-08-01 12:53:52 -07:00
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH share/directxtex)
|
2020-10-13 22:40:52 +02:00
|
|
|
|
2023-04-05 16:30:02 -07:00
|
|
|
if("tools" IN_LIST FEATURES)
|
2020-12-28 17:28:53 -08:00
|
|
|
|
|
|
|
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/directxtex/")
|
|
|
|
|
2024-03-11 20:16:53 -07:00
|
|
|
if((VCPKG_TARGET_ARCHITECTURE STREQUAL x64) AND (NOT (("openexr" IN_LIST FEATURES) OR ("xbox" IN_LIST FEATURES))))
|
2023-04-05 16:30:02 -07:00
|
|
|
|
|
|
|
vcpkg_download_distfile(
|
|
|
|
TEXASSEMBLE_EXE
|
|
|
|
URLS "https://github.com/Microsoft/DirectXTex/releases/download/${DIRECTXTEX_TAG}/texassemble.exe"
|
|
|
|
FILENAME "texassemble-${DIRECTXTEX_TAG}.exe"
|
2024-06-07 02:18:05 -07:00
|
|
|
SHA512 1226bbb29ebe750d4371bf07dfab3511a22c371964cc4b977917466af5619517a6d4ac02a5da2d69676524d17a5c1efabc11328db41515cd7ae911efcb919397
|
2023-04-05 16:30:02 -07:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_download_distfile(
|
|
|
|
TEXCONV_EXE
|
|
|
|
URLS "https://github.com/Microsoft/DirectXTex/releases/download/${DIRECTXTEX_TAG}/texconv.exe"
|
|
|
|
FILENAME "texconv-${DIRECTXTEX_TAG}.exe"
|
2024-06-07 02:18:05 -07:00
|
|
|
SHA512 e28e29af20f3703bf88dc43f9dbbad4844c8746a8b22aa74dbe7f0ea8668b263a7798ab99373c61b7ed89efbc31946b0d75dde6acadcc649ad8fde4d78887c2f
|
2023-04-05 16:30:02 -07:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_download_distfile(
|
|
|
|
TEXDIAG_EXE
|
|
|
|
URLS "https://github.com/Microsoft/DirectXTex/releases/download/${DIRECTXTEX_TAG}/texdiag.exe"
|
|
|
|
FILENAME "texdiag-${DIRECTXTEX_TAG}.exe"
|
2024-06-07 02:18:05 -07:00
|
|
|
SHA512 b535c9a9f36e35821a300f32dc193493e8e27a262e221d60719bf47e5da8927da50faad6a37995f520c4411af083ed36c2248c60be28e9bd8bdb482f71e8fb50
|
2023-04-05 16:30:02 -07: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-15 15:24:06 -08:00
|
|
|
|
2023-04-05 16:30:02 -07:00
|
|
|
elseif((VCPKG_TARGET_ARCHITECTURE STREQUAL arm64) AND (NOT ("openexr" IN_LIST FEATURES)))
|
2021-04-09 09:54:41 -07:00
|
|
|
|
2023-04-05 16:30:02 -07: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-06-07 02:18:05 -07:00
|
|
|
SHA512 18a9022d550a8c9d0a74f1a86749c3c2766f71c23ad93efeab2240f35bfe5dcce575d0f13a1e5bfc4fe1a2abd2903c1b71dc0dcab9c30821710e4f3a2595d674
|
2023-04-05 16:30:02 -07: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-06-07 02:18:05 -07:00
|
|
|
SHA512 27d92c44cd34421ba2c79da83a817c16ad67091286be3d64ad90dd0a3ceaf59c92c8268fe12293adbd6e84a22647eb50e74ec933365d5bf04a7bf391a9e13150
|
2023-04-05 16:30:02 -07:00
|
|
|
)
|
2021-04-09 09:54:41 -07:00
|
|
|
|
2023-04-05 16:30:02 -07: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-06-07 02:18:05 -07:00
|
|
|
SHA512 c179b7729bce61a20268fe69814fc3764104902748f98567e00c8d50860d515b94b1806caed4b07c76da1ddbb43390fa2d6c9cb33ad404456e05fde2b48a52a1
|
2021-04-09 09:54:41 -07:00
|
|
|
)
|
|
|
|
|
2023-04-05 16:30:02 -07: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 00:24:49 -08:00
|
|
|
SEARCH_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bin"
|
2023-04-05 16:30:02 -07:00
|
|
|
)
|
|
|
|
|
|
|
|
endif()
|
2020-06-17 23:48:39 +02:00
|
|
|
endif()
|
|
|
|
|
2020-12-28 17: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-21 22:39:47 -07:00
|
|
|
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
2023-05-01 15:25:18 -07:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|