mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-24 14:29:06 +08:00
0b57cc72ac
* [directxmesh, directxtex, directxtk(12), uvatalas] Update ports for April 2023 releases * directxtex port updated upstream with better OpenMP support fix * OpenMP hotfix for UVAtlas * Update baseline * Forgot to update the CMake config file for OpenMP * CMake fixes made upstream * Update baseline
84 lines
3.0 KiB
CMake
84 lines
3.0 KiB
CMake
set(DIRECTXTK_TAG apr2023)
|
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
|
|
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO Microsoft/DirectXTK12
|
|
REF ${DIRECTXTK_TAG}
|
|
SHA512 ab8d9db145e8342e473e5b23d3ce0a396408c42db53ba38882e57f461b15694d291a98a55e2db19724c82ef1baef6ee1dc3c5ff3861684e9aeed296e352d7e7a
|
|
HEAD_REF main
|
|
)
|
|
|
|
vcpkg_check_features(
|
|
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
FEATURES
|
|
spectre ENABLE_SPECTRE_MITIGATION
|
|
xaudio2-9 BUILD_XAUDIO_WIN10
|
|
xaudio2redist BUILD_XAUDIO_REDIST
|
|
)
|
|
|
|
set(EXTRA_OPTIONS -DBUILD_TESTING=OFF)
|
|
|
|
if(NOT VCPKG_TARGET_IS_XBOX)
|
|
set(DXCPATH "${CURRENT_HOST_INSTALLED_DIR}/tools/directx-dxc")
|
|
list(APPEND EXTRA_OPTIONS -DBUILD_DXIL_SHADERS=ON "-DDIRECTX_DXC_PATH=${DXCPATH}")
|
|
endif()
|
|
|
|
vcpkg_cmake_configure(
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
OPTIONS ${FEATURE_OPTIONS} ${EXTRA_OPTIONS}
|
|
)
|
|
|
|
vcpkg_cmake_install()
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH share/directxtk12)
|
|
|
|
if("tools" IN_LIST FEATURES)
|
|
|
|
vcpkg_download_distfile(
|
|
MAKESPRITEFONT_EXE
|
|
URLS "https://github.com/Microsoft/DirectXTK12/releases/download/${DIRECTXTK_TAG}/MakeSpriteFont.exe"
|
|
FILENAME "makespritefont-${DIRECTXTK_TAG}.exe"
|
|
SHA512 f014172f127a00aa3b51f33c17062772e75271f57fbade4db8c2da634cbc090c0f4eb8dd2771f6faead624054244469705f195fe10d643570df3ba95dbcb119f
|
|
)
|
|
|
|
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/directxtk12/")
|
|
|
|
file(INSTALL "${MAKESPRITEFONT_EXE}" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/directxtk12/")
|
|
|
|
file(RENAME "${CURRENT_PACKAGES_DIR}/tools/directxtk12/makespritefont-${DIRECTXTK_TAG}.exe" "${CURRENT_PACKAGES_DIR}/tools/directxtk12/makespritefont.exe")
|
|
|
|
if(VCPKG_TARGET_ARCHITECTURE STREQUAL x64)
|
|
|
|
vcpkg_download_distfile(
|
|
XWBTOOL_EXE
|
|
URLS "https://github.com/Microsoft/DirectXTK12/releases/download/${DIRECTXTK_TAG}/XWBTool.exe"
|
|
FILENAME "xwbtool-${DIRECTXTK_TAG}.exe"
|
|
SHA512 2bb9f9ecfe65e373dadd84b1550e499de5507fcf57257379e3da1f4d4325df686ec5e784754990c89da0a2915c12578424f5b66009ebc14d969c5c92db50b09a
|
|
)
|
|
|
|
file(INSTALL "${XWBTOOL_EXE}" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/directxtk12/")
|
|
|
|
file(RENAME "${CURRENT_PACKAGES_DIR}/tools/directxtk12/xwbtool-${DIRECTXTK_TAG}.exe" "${CURRENT_PACKAGES_DIR}/tools/directxtk12/xwbtool.exe")
|
|
|
|
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL arm64)
|
|
|
|
vcpkg_download_distfile(
|
|
XWBTOOL_EXE
|
|
URLS "https://github.com/Microsoft/DirectXTK12/releases/download/${DIRECTXTK_TAG}/XWBTool_arm64.exe"
|
|
FILENAME "xwbtool-${DIRECTXTK_TAG}-arm64.exe"
|
|
SHA512 453a5504074f43104d77d79ab2824b7091302a0339361a433e56acc854594a3413f9675aaaa6be518329e2ab9c3cacb50a25293787d3f944e74d1a8eebc23a33
|
|
)
|
|
|
|
file(INSTALL "${XWBTOOL_EXE}" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/directxtk12/")
|
|
|
|
file(RENAME "${CURRENT_PACKAGES_DIR}/tools/directxtk12/xwbtool-${DIRECTXTK_TAG}-arm64.exe" "${CURRENT_PACKAGES_DIR}/tools/directxtk12/xwbtool.exe")
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|