set(DIRECTXTK_TAG feb2023) 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 feb2023b SHA512 ada04322589e635a7fc21a3b35e9af676bba060a800b56b2735e7e109801b08daa9f9ef8b6b25762e470a88a9cb0fdab3cb46dcc7b13e0344ded4d507254ea37 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 2cf274cd1c9a4692b84bd3ac9c3266eb3a20b1598b29f8f77893cb5911c3e70c4b0151df54a3fdef93215db22c76854a61b6d3688ac9cd1875611fe34d196da3 ) vcpkg_download_distfile( XWBTOOL_EXE URLS "https://github.com/Microsoft/DirectXTK/releases/download/${DIRECTXTK_TAG}/XWBTool.exe" FILENAME "xwbtool-${DIRECTXTK_TAG}.exe" SHA512 ab328e336228ec5e1abe0aa44707203325d743432728a1d8d01990529350fe6dc0f1bc5d58ce961456f6273922169abc1a4a9ca3804dd7f40198a182462c332d ) 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)