mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-24 23:11:08 +08:00
82 lines
2.7 KiB
CMake
82 lines
2.7 KiB
CMake
set(DIRECTXMESH_TAG jun2024)
|
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
|
|
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO Microsoft/DirectXMesh
|
|
REF ${DIRECTXMESH_TAG}
|
|
SHA512 883149da7eefbff7630aa1d5b0e0104dbb7eca9153d385dd35b82319d3091f7ff75a353ef29f1f3ec5f34b4a89f5d08d4a69bd70842134db5ebe36111c654e71
|
|
HEAD_REF main
|
|
)
|
|
|
|
vcpkg_check_features(
|
|
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
FEATURES
|
|
dx12 BUILD_DX12
|
|
spectre ENABLE_SPECTRE_MITIGATION
|
|
tools BUILD_TOOLS
|
|
)
|
|
|
|
if (VCPKG_HOST_IS_LINUX)
|
|
message(WARNING "Build ${PORT} requires GCC version 9 or later")
|
|
endif()
|
|
|
|
vcpkg_cmake_configure(
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
OPTIONS ${FEATURE_OPTIONS}
|
|
)
|
|
|
|
vcpkg_cmake_install()
|
|
vcpkg_fixup_pkgconfig()
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH share/directxmesh)
|
|
|
|
if("tools" IN_LIST FEATURES)
|
|
|
|
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/directxmesh/")
|
|
|
|
if(VCPKG_TARGET_ARCHITECTURE STREQUAL x64)
|
|
|
|
vcpkg_download_distfile(
|
|
MESHCONVERT_EXE
|
|
URLS "https://github.com/Microsoft/DirectXMesh/releases/download/${DIRECTXMESH_TAG}/meshconvert.exe"
|
|
FILENAME "meshconvert-${DIRECTXMESH_TAG}.exe"
|
|
SHA512 fe1b2faab2f138a09706c956b5283a8f6e915bc57e670243f1ef21be85c6d030e45eff8b4e46551b7ccaa70e99651efbe99c63a927a24125f4bf1567d9f7698d
|
|
)
|
|
|
|
file(INSTALL
|
|
"${MESHCONVERT_EXE}"
|
|
DESTINATION "${CURRENT_PACKAGES_DIR}/tools/directxmesh/")
|
|
|
|
file(RENAME "${CURRENT_PACKAGES_DIR}/tools/directxmesh/meshconvert-${DIRECTXMESH_TAG}.exe" "${CURRENT_PACKAGES_DIR}/tools/directxmesh/meshconvert.exe")
|
|
|
|
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL arm64)
|
|
|
|
vcpkg_download_distfile(
|
|
MESHCONVERT_EXE
|
|
URLS "https://github.com/Microsoft/DirectXMesh/releases/download/${DIRECTXMESH_TAG}/meshconvert_arm64.exe"
|
|
FILENAME "meshconvert-${DIRECTXMESH_TAG}-arm64.exe"
|
|
SHA512 d4be686a2e65f1385e71ed0a23e17827ae4717ab61e54c80c72170df60cc29cb3f5408b04ce9bec562519c0238c05ed976e04a58ec327775bc0d26cf13971c73
|
|
)
|
|
|
|
file(INSTALL
|
|
"${MESHCONVERT_EXE}"
|
|
DESTINATION "${CURRENT_PACKAGES_DIR}/tools/directxmesh/")
|
|
|
|
file(RENAME "${CURRENT_PACKAGES_DIR}/tools/directxmesh/meshconvert-${DIRECTXMESH_TAG}-arm64.exe" "${CURRENT_PACKAGES_DIR}/tools/directxmesh/meshconvert.exe")
|
|
|
|
else()
|
|
|
|
vcpkg_copy_tools(
|
|
TOOL_NAMES meshconvert
|
|
SEARCH_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bin"
|
|
)
|
|
|
|
endif()
|
|
endif()
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|