2020-12-29 09:28:53 +08:00
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
|
|
|
|
|
|
vcpkg_fail_port_install(ON_TARGET "OSX" "Linux")
|
2017-06-10 10:34:07 +08:00
|
|
|
|
2017-12-23 22:51:17 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO Microsoft/DirectXTK
|
2021-11-14 06:46:33 +08:00
|
|
|
REF nov2021
|
|
|
|
SHA512 bf9297c88b4c80e70562593d0f2a7d8cf438b0bbc731f4725287ff1155e8879e538d339e72dfb4eceb2c94a8f410ff24421a12560013ea65c4e43fe57756109c
|
2017-12-23 22:51:17 +08:00
|
|
|
HEAD_REF master
|
2016-11-25 17:37:48 +08:00
|
|
|
)
|
|
|
|
|
2020-10-28 11:32:43 +08:00
|
|
|
vcpkg_check_features(
|
|
|
|
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
|
|
FEATURES
|
|
|
|
xaudio2-9 BUILD_XAUDIO_WIN10
|
|
|
|
xaudio2-8 BUILD_XAUDIO_WIN8
|
2021-06-12 01:02:03 +08:00
|
|
|
xaudio2redist BUILD_XAUDIO_WIN7
|
2016-11-25 17:37:48 +08:00
|
|
|
)
|
|
|
|
|
2020-12-29 09:28:53 +08:00
|
|
|
if(VCPKG_TARGET_IS_UWP)
|
|
|
|
set(EXTRA_OPTIONS -DBUILD_TOOLS=OFF)
|
|
|
|
else()
|
|
|
|
set(EXTRA_OPTIONS -DBUILD_TOOLS=ON)
|
|
|
|
endif()
|
|
|
|
|
2021-10-16 10:34:23 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2020-12-29 09:28:53 +08:00
|
|
|
OPTIONS ${FEATURE_OPTIONS} ${EXTRA_OPTIONS}
|
2019-08-14 05:27:28 +08:00
|
|
|
)
|
|
|
|
|
2021-10-16 10:34:23 +08:00
|
|
|
vcpkg_cmake_install()
|
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH cmake)
|
2016-11-25 17:37:48 +08:00
|
|
|
|
2021-04-10 00:54:41 +08:00
|
|
|
if((VCPKG_HOST_IS_WINDOWS) AND (VCPKG_TARGET_ARCHITECTURE MATCHES x64))
|
2021-01-16 07:24:06 +08:00
|
|
|
vcpkg_download_distfile(
|
|
|
|
MAKESPRITEFONT_EXE
|
2021-11-14 06:46:33 +08:00
|
|
|
URLS "https://github.com/Microsoft/DirectXTK/releases/download/nov2021/MakeSpriteFont.exe"
|
|
|
|
FILENAME "makespritefont-nov2021.exe"
|
|
|
|
SHA512 0aab40aced022588d9c1089c5b2f297b0521497d0ae559ead98f99e1e73f2daf9f38ebecadb413095abd2a6c207183fbca582d47528c6f21258df3ac391134e5
|
2020-12-29 09:28:53 +08:00
|
|
|
)
|
|
|
|
|
2021-01-16 07:24:06 +08:00
|
|
|
vcpkg_download_distfile(
|
|
|
|
XWBTOOL_EXE
|
2021-11-14 06:46:33 +08:00
|
|
|
URLS "https://github.com/Microsoft/DirectXTK/releases/download/nov2021/XWBTool.exe"
|
|
|
|
FILENAME "xwbtool-nov2021.exe"
|
|
|
|
SHA512 f2f291c496500e593c0a4795fee9fafc685666682f23a38a25546bb67ec083533a26f2ce0562b819abea44bd8b403a2f246fbf978e366c457eb8a0f836fd5a2e
|
2020-12-29 09:28:53 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/directxtk/")
|
|
|
|
|
|
|
|
file(INSTALL
|
2021-01-16 07:24:06 +08:00
|
|
|
${MAKESPRITEFONT_EXE}
|
|
|
|
${XWBTOOL_EXE}
|
2021-10-16 10:34:23 +08:00
|
|
|
DESTINATION "${CURRENT_PACKAGES_DIR}/tools/directxtk/")
|
2021-01-16 07:24:06 +08:00
|
|
|
|
2021-11-14 06:46:33 +08:00
|
|
|
file(RENAME "${CURRENT_PACKAGES_DIR}/tools/directxtk/makespritefont-nov2021.exe" "${CURRENT_PACKAGES_DIR}/tools/directxtk/makespritefont.exe")
|
|
|
|
file(RENAME "${CURRENT_PACKAGES_DIR}/tools/directxtk/xwbtool-nov2021.exe" "${CURRENT_PACKAGES_DIR}/tools/directxtk/xwbtool.exe")
|
2021-04-10 00:54:41 +08:00
|
|
|
|
|
|
|
elseif(NOT VCPKG_TARGET_IS_UWP)
|
|
|
|
|
|
|
|
vcpkg_copy_tools(
|
|
|
|
TOOL_NAMES XWBTool
|
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
|
|
|
)
|
|
|
|
|
2019-07-19 04:50:50 +08:00
|
|
|
endif()
|
2016-11-25 17:37:48 +08:00
|
|
|
|
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)
|