mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-25 09:59:07 +08:00
7ca2e19cdd
* [directxtk, directxtk12] update ports for June 2022 releaes * Reformat vcpkg * Update baseline
74 lines
2.4 KiB
CMake
74 lines
2.4 KiB
CMake
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 jun2022
|
|
SHA512 683adec36945611150393bb198f54a7d1e072cc9b41dd47ca9ee14459babff867d730b7031602383ed9373500f1541a5091021927bc15df59d47a3b2a1b3588c
|
|
HEAD_REF main
|
|
)
|
|
|
|
vcpkg_check_features(
|
|
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
FEATURES
|
|
xaudio2-9 BUILD_XAUDIO_WIN10
|
|
xaudio2-8 BUILD_XAUDIO_WIN8
|
|
xaudio2redist BUILD_XAUDIO_WIN7
|
|
)
|
|
|
|
if(VCPKG_TARGET_IS_UWP)
|
|
set(EXTRA_OPTIONS -DBUILD_TOOLS=OFF)
|
|
else()
|
|
set(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/jun2022/MakeSpriteFont.exe"
|
|
FILENAME "makespritefont-jun2022.exe"
|
|
SHA512 7cdc80e12a4a7be70733d582e4f613055a549345f83e24035cfce42d37568c4934c1bb68df5238f41df9d7fa0e84095aeb227d23450323e31a5d1d68cb505842
|
|
)
|
|
|
|
vcpkg_download_distfile(
|
|
XWBTOOL_EXE
|
|
URLS "https://github.com/Microsoft/DirectXTK/releases/download/jun2022/XWBTool.exe"
|
|
FILENAME "xwbtool-jun2022.exe"
|
|
SHA512 b5782323e241641a429f66ad1ac511cfdfd6301851474dafdde274a4f93b49877406d5d0ab992097be7afe8db90fdb9488a9d6de5afce7e086df2e66a5bbca12
|
|
)
|
|
|
|
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-jun2022.exe" "${CURRENT_PACKAGES_DIR}/tools/directxtk/makespritefont.exe")
|
|
file(RENAME "${CURRENT_PACKAGES_DIR}/tools/directxtk/xwbtool-jun2022.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)
|