set(DIRECTXMESH_TAG jun2023) vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Microsoft/DirectXMesh REF ${DIRECTXMESH_TAG} SHA512 01fd1fc43dd51c203b31b8f668a4ece731bad980c97b65481fdd86e2b458556fb46b7709444c1741568b3c5633b766c51cb3211e21f348f12278ad8b10044e7c 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} -DBUILD_TESTING=OFF ) vcpkg_cmake_install() 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 0fca478527c9975776a6a52c0ada08aa4f8bfa169bac9d204295abd6a1a9357c703ae69eabade9c33bab46c25a7342bfc53910ce8ae3cc6a166f807b0e8a8e02 ) 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 92515ec4f3acf0f6cf66e3e20ac709c2b525632d042569272e9208917560f22c15fbbb8066ae44573fcf9c4246daa673c06316641e9585efa873aa06e5efd681 ) 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/CMake" ) 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")