2023-02-03 08:51:33 +08:00
|
|
|
set(DIRECTXTEX_TAG jan2023)
|
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-03-09 06:06:20 +08:00
|
|
|
REF jan2023c
|
|
|
|
SHA512 df550651b0fc4927aa9f837e0347b98722b8112ca7d7eddecded03a4a8a3dd7afed42c882c04f0b64e403a26c84d4e1c88ee9c104395be446ce220b28c6af9da
|
[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
|
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()
|
|
|
|
|
2023-02-14 00:38:42 +08:00
|
|
|
set(EXTRA_OPTIONS -DBUILD_SAMPLE=OFF -DBUILD_TESTING=OFF -DBC_USE_OPENMP=ON)
|
2023-01-05 06:44:07 +08:00
|
|
|
|
2023-03-09 06:06:20 +08:00
|
|
|
if(VCPKG_TARGET_IS_UWP OR VCPKG_TARGET_IS_XBOX)
|
2023-01-05 06:44:07 +08:00
|
|
|
list(APPEND EXTRA_OPTIONS -DBUILD_TOOLS=OFF)
|
2020-12-29 09:28:53 +08:00
|
|
|
else()
|
2023-01-05 06:44:07 +08:00
|
|
|
list(APPEND EXTRA_OPTIONS -DBUILD_TOOLS=ON)
|
2020-12-29 09:28:53 +08:00
|
|
|
endif()
|
|
|
|
|
2021-10-16 10:34:23 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2023-01-05 06:44:07 +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-02-03 08:51:33 +08:00
|
|
|
if(VCPKG_HOST_IS_WINDOWS AND (VCPKG_TARGET_ARCHITECTURE MATCHES x64) AND (NOT ("openexr" IN_LIST FEATURES)))
|
2021-01-16 07:24:06 +08:00
|
|
|
vcpkg_download_distfile(
|
|
|
|
TEXASSEMBLE_EXE
|
2022-11-01 04:15:33 +08:00
|
|
|
URLS "https://github.com/Microsoft/DirectXTex/releases/download/${DIRECTXTEX_TAG}/texassemble.exe"
|
|
|
|
FILENAME "texassemble-${DIRECTXTEX_TAG}.exe"
|
2023-02-03 08:51:33 +08:00
|
|
|
SHA512 a339b725107d8b45e73e2cf24a989844a98a28cda2a01ff760cc46dea49f09b27b5d8d4c1c6940b323b0d0cc83492d21895a958e11ba82a0bbfdd877bfad7ded
|
2020-12-29 09:28:53 +08:00
|
|
|
)
|
|
|
|
|
2021-01-16 07:24:06 +08:00
|
|
|
vcpkg_download_distfile(
|
|
|
|
TEXCONV_EXE
|
2022-11-01 04:15:33 +08:00
|
|
|
URLS "https://github.com/Microsoft/DirectXTex/releases/download/${DIRECTXTEX_TAG}/texconv.exe"
|
|
|
|
FILENAME "texconv-${DIRECTXTEX_TAG}.exe"
|
2023-02-03 08:51:33 +08:00
|
|
|
SHA512 6dc472cec94c771bb289a927ee0cce0507332394353306806a7d244999591f9f7c46dd86a55cf24c727fb0592f777b2a4df4f4edaecc72c40ee72a00830372f2
|
2020-12-29 09:28:53 +08:00
|
|
|
)
|
|
|
|
|
2021-01-16 07:24:06 +08:00
|
|
|
vcpkg_download_distfile(
|
|
|
|
TEXDIAG_EXE
|
2022-11-01 04:15:33 +08:00
|
|
|
URLS "https://github.com/Microsoft/DirectXTex/releases/download/${DIRECTXTEX_TAG}/texdiag.exe"
|
|
|
|
FILENAME "texdiag-${DIRECTXTEX_TAG}.exe"
|
2023-02-03 08:51:33 +08:00
|
|
|
SHA512 512346a880459179fb585dfb2ca97ef6a668e803be201de180e6ca3e431c61b73204f80cabe9b3aced97a33abdfd831cce56eb9228726db5ae9fe993c59845a6
|
2020-12-29 09:28:53 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/directxtex/")
|
|
|
|
|
|
|
|
file(INSTALL
|
2021-01-16 07:24:06 +08:00
|
|
|
${TEXASSEMBLE_EXE}
|
|
|
|
${TEXCONV_EXE}
|
|
|
|
${TEXDIAG_EXE}
|
2021-10-16 10:34:23 +08:00
|
|
|
DESTINATION "${CURRENT_PACKAGES_DIR}/tools/directxtex/")
|
2021-01-16 07:24:06 +08:00
|
|
|
|
2022-11-01 04:15:33 +08:00
|
|
|
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-04-10 00:54:41 +08:00
|
|
|
|
2023-03-09 06:06:20 +08:00
|
|
|
elseif(VCPKG_TARGET_IS_WINDOWS AND (NOT VCPKG_TARGET_IS_UWP) AND (NOT VCPKG_TARGET_IS_XBOX) AND ("dx11" IN_LIST FEATURES))
|
2021-04-10 00:54:41 +08:00
|
|
|
|
|
|
|
vcpkg_copy_tools(
|
|
|
|
TOOL_NAMES texassemble texconv texdiag
|
2021-10-16 10:34:23 +08:00
|
|
|
SEARCH_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bin/CMake"
|
2021-04-10 00:54:41 +08:00
|
|
|
)
|
|
|
|
|
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")
|
|
|
|
|
2021-10-16 10:34:23 +08:00
|
|
|
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|