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-01-16 07:24:06 +08:00
|
|
|
REF jan2021b
|
|
|
|
SHA512 87cac6f3ea9e16b5b2d195fd363d5da45d99a08b4bb7be8261a7347ec0e316604acc130129cabc24d635be77ec2487341eca1c5f46238d3ce27fbde1a2e817d1
|
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
|
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()
|
|
|
|
|
2020-10-28 11:32:43 +08:00
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
PREFER_NINJA
|
2020-12-29 09:28:53 +08:00
|
|
|
OPTIONS ${FEATURE_OPTIONS} ${EXTRA_OPTIONS}
|
2019-08-14 05:27:28 +08:00
|
|
|
)
|
|
|
|
|
2020-12-29 09:28:53 +08:00
|
|
|
vcpkg_install_cmake()
|
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH cmake)
|
2016-11-25 17:37:48 +08:00
|
|
|
|
2019-12-21 08:21:10 +08:00
|
|
|
if(NOT VCPKG_TARGET_IS_UWP)
|
2020-10-28 11:32:43 +08:00
|
|
|
vcpkg_copy_tools(
|
|
|
|
TOOL_NAMES XWBTool
|
|
|
|
SEARCH_DIR ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bin/CMake
|
|
|
|
)
|
2020-12-29 09:28:53 +08:00
|
|
|
|
|
|
|
vcpkg_install_msbuild(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
PROJECT_SUBPATH MakeSpriteFont/MakeSpriteFont.csproj
|
|
|
|
PLATFORM AnyCPU
|
|
|
|
)
|
|
|
|
|
|
|
|
elseif((VCPKG_HOST_IS_WINDOWS) AND (VCPKG_TARGET_ARCHITECTURE MATCHES x64))
|
2021-01-16 07:24:06 +08:00
|
|
|
vcpkg_download_distfile(
|
|
|
|
MAKESPRITEFONT_EXE
|
2021-01-13 12:01:37 +08:00
|
|
|
URLS "https://github.com/Microsoft/DirectXTK/releases/download/jan2021/MakeSpriteFont.exe"
|
2021-01-16 07:24:06 +08:00
|
|
|
FILENAME "makespritefont-jan2021.exe"
|
2021-01-13 12:01:37 +08:00
|
|
|
SHA512 0cca19694fd3625c5130a85456f7bf1dabc8c5f893223c19da134a0c4d64de853f7871644365dcec86012543f3a59a96bfabd9e51947648f6d82480602116fc4
|
2020-12-29 09:28:53 +08:00
|
|
|
)
|
|
|
|
|
2021-01-16 07:24:06 +08:00
|
|
|
vcpkg_download_distfile(
|
|
|
|
XWBTOOL_EXE
|
2021-01-13 12:01:37 +08:00
|
|
|
URLS "https://github.com/Microsoft/DirectXTK/releases/download/jan2021/XWBTool.exe"
|
2021-01-16 07:24:06 +08:00
|
|
|
FILENAME "xwbtool-jan2021.exe"
|
2021-01-13 12:01:37 +08:00
|
|
|
SHA512 91c9d0da90697ba3e0ebe4afcc4c8e084045b76b26e94d7acd4fd87e5965b52dd61d26038f5eb749a3f6de07940bf6e3af8e9f19d820bf904fbdb2752b78fce9
|
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}
|
2020-12-29 09:28:53 +08:00
|
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/tools/directxtk/)
|
2021-01-16 07:24:06 +08:00
|
|
|
|
|
|
|
file(RENAME ${CURRENT_PACKAGES_DIR}/tools/directxtk/makespritefont-jan2021.exe ${CURRENT_PACKAGES_DIR}/tools/directxtk/makespritefont.exe)
|
|
|
|
file(RENAME ${CURRENT_PACKAGES_DIR}/tools/directxtk/xwbtool-jan2021.exe ${CURRENT_PACKAGES_DIR}/tools/directxtk/xwbtool.exe)
|
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")
|
|
|
|
|
2019-10-11 22:52:19 +08:00
|
|
|
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|