set(DIRECTXTK_TAG dec2022) 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 4830becb1100566a1f0d176c1eb08f94ce3f36600b7a8e0c55b423e0f9d40bafb5018914be4903b9a21682f04a92571019e2d6c4549a145f0b3f0198c50c639a HEAD_REF main ) vcpkg_check_features( OUT_FEATURE_OPTIONS FEATURE_OPTIONS FEATURES spectre ENABLE_SPECTRE_MITIGATION xaudio2-9 BUILD_XAUDIO_WIN10 xaudio2-8 BUILD_XAUDIO_WIN8 xaudio2redist BUILD_XAUDIO_WIN7 ) set(EXTRA_OPTIONS -DBUILD_TESTING=OFF) if(VCPKG_TARGET_IS_UWP) list(APPEND EXTRA_OPTIONS -DBUILD_TOOLS=OFF) else() list(APPEND EXTRA_OPTIONS -DBUILD_TOOLS=ON) endif() vcpkg_cmake_configure( SOURCE_PATH "${SOURCE_PATH}" OPTIONS ${FEATURE_OPTIONS} ${EXTRA_OPTIONS} ) vcpkg_cmake_install() vcpkg_cmake_config_fixup(CONFIG_PATH share/directxtk) if((VCPKG_HOST_IS_WINDOWS) AND (VCPKG_TARGET_ARCHITECTURE MATCHES x64)) vcpkg_download_distfile( MAKESPRITEFONT_EXE URLS "https://github.com/Microsoft/DirectXTK/releases/download/${DIRECTXTK_TAG}/MakeSpriteFont.exe" FILENAME "makespritefont-${DIRECTXTK_TAG}.exe" SHA512 6cb4351206707308382f2fe152c10dd2c99f300d960e6feac09f63e64c38225381d95f77ec557ec3dc60031227b4b878cfb18059c1bc2122e87cda1f1d25d7e2 ) vcpkg_download_distfile( XWBTOOL_EXE URLS "https://github.com/Microsoft/DirectXTK/releases/download/${DIRECTXTK_TAG}/XWBTool.exe" FILENAME "xwbtool-${DIRECTXTK_TAG}.exe" SHA512 901b326b8c86a94c5867e26ca35fa355cadcb283bb81c1fd630385a2ed68ffb43b00ed702953781db660d184ef221184bac0cc905e8502e4d484b01c5b3ff124 ) file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/directxtk/") file(INSTALL ${MAKESPRITEFONT_EXE} ${XWBTOOL_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") file(RENAME "${CURRENT_PACKAGES_DIR}/tools/directxtk/xwbtool-${DIRECTXTK_TAG}.exe" "${CURRENT_PACKAGES_DIR}/tools/directxtk/xwbtool.exe") elseif(NOT VCPKG_TARGET_IS_UWP) vcpkg_copy_tools( TOOL_NAMES XWBTool SEARCH_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bin/CMake" ) endif() file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)