mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-29 18:59:07 +08:00
6f054c7409
* [directxmesh, directxtex, directxtk, directxkt12] Update for October 2023 releases * Update baseline
92 lines
3.3 KiB
CMake
92 lines
3.3 KiB
CMake
set(DIRECTXTK_TAG oct2023)
|
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
|
|
if(VCPKG_TARGET_IS_MINGW)
|
|
message(NOTICE "Building ${PORT} for MinGW requires the HLSL Compiler fxc.exe also be in the PATH. See https://aka.ms/windowssdk.")
|
|
endif()
|
|
|
|
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO Microsoft/DirectXTK
|
|
REF ${DIRECTXTK_TAG}
|
|
SHA512 3df7f26df2edfbfd8ba8ab2ff8b7f653c1df194145e89fd2bbe7c3f0581d4a11de2845091a6c7d27c2b7800d2b1e8770728fb357e6ab0ce57e714d8fcc0c3453
|
|
HEAD_REF main
|
|
)
|
|
|
|
vcpkg_check_features(
|
|
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
FEATURES
|
|
spectre ENABLE_SPECTRE_MITIGATION
|
|
tools BUILD_TOOLS
|
|
xaudio2-9 BUILD_XAUDIO_WIN10
|
|
xaudio2-8 BUILD_XAUDIO_WIN8
|
|
xaudio2redist BUILD_XAUDIO_WIN7
|
|
)
|
|
|
|
set(EXTRA_OPTIONS -DBUILD_TESTING=OFF)
|
|
|
|
vcpkg_cmake_configure(
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
OPTIONS ${FEATURE_OPTIONS} ${EXTRA_OPTIONS}
|
|
)
|
|
|
|
vcpkg_cmake_install()
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH share/directxtk)
|
|
|
|
if("tools" IN_LIST FEATURES)
|
|
|
|
vcpkg_download_distfile(
|
|
MAKESPRITEFONT_EXE
|
|
URLS "https://github.com/Microsoft/DirectXTK/releases/download/${DIRECTXTK_TAG}/MakeSpriteFont.exe"
|
|
FILENAME "makespritefont-${DIRECTXTK_TAG}.exe"
|
|
SHA512 00a4c94d3f9b6607f652edfbe1ce0cc9c09437f3084e2b252462458e652ff2735bf94f028091739ec66edbf29c1ebeb813af5c9b68644ac02cebf8ab6833d8fa
|
|
)
|
|
|
|
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/directxtk/")
|
|
|
|
file(INSTALL "${MAKESPRITEFONT_EXE}" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/directxtk/")
|
|
|
|
file(RENAME "${CURRENT_PACKAGES_DIR}/tools/directxtk/makespritefont-${DIRECTXTK_TAG}.exe" "${CURRENT_PACKAGES_DIR}/tools/directxtk/makespritefont.exe")
|
|
|
|
if(VCPKG_TARGET_ARCHITECTURE STREQUAL x64)
|
|
|
|
vcpkg_download_distfile(
|
|
XWBTOOL_EXE
|
|
URLS "https://github.com/Microsoft/DirectXTK/releases/download/${DIRECTXTK_TAG}/XWBTool.exe"
|
|
FILENAME "xwbtool-${DIRECTXTK_TAG}.exe"
|
|
SHA512 2b60b1dedfe8803914d16c760b546aad82a05404eedff9740f56a1ca8e15d9b77bba3743a3b39adb2092d04afc90106c8a3c2dffc87392cf5dfe6686752c4d3d
|
|
)
|
|
|
|
file(INSTALL "${XWBTOOL_EXE}" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/directxtk/")
|
|
|
|
file(RENAME "${CURRENT_PACKAGES_DIR}/tools/directxtk/xwbtool-${DIRECTXTK_TAG}.exe" "${CURRENT_PACKAGES_DIR}/tools/directxtk/xwbtool.exe")
|
|
|
|
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL arm64)
|
|
|
|
vcpkg_download_distfile(
|
|
XWBTOOL_EXE
|
|
URLS "https://github.com/Microsoft/DirectXTK/releases/download/${DIRECTXTK_TAG}/XWBTool_arm64.exe"
|
|
FILENAME "xwbtool-${DIRECTXTK_TAG}-arm64.exe"
|
|
SHA512 d0ff53fefedeba588ad583f99ab2c2420fe0b30a1efb88e4ce556436f1d5d8d76c69f28be7ca7209660212d017a1a404bcdb43349743a4142a7c3e88937ce1d3
|
|
)
|
|
|
|
file(INSTALL "${XWBTOOL_EXE}" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/directxtk/")
|
|
|
|
file(RENAME "${CURRENT_PACKAGES_DIR}/tools/directxtk/xwbtool-${DIRECTXTK_TAG}-arm64.exe" "${CURRENT_PACKAGES_DIR}/tools/directxtk/xwbtool.exe")
|
|
|
|
else()
|
|
|
|
vcpkg_copy_tools(
|
|
TOOL_NAMES XWBTool
|
|
SEARCH_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bin/CMake"
|
|
)
|
|
|
|
endif()
|
|
endif()
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|