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:50:33 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO Microsoft/DirectXMesh
|
2020-12-29 09:28:53 +08:00
|
|
|
REF nov2020b
|
|
|
|
SHA512 a3520d916324e16004ec0052c6d4c628be2ea62583d0169b663f67ce03ef84c3ba8ea01c239c75dc89a359de6748039dc11e405ba4b0c4f33ee0225e4e248415
|
2017-12-23 22:50:33 +08:00
|
|
|
HEAD_REF master
|
2020-12-29 09:28:53 +08:00
|
|
|
FILE_DISAMBIGUATOR 2
|
2017-01-11 22:42:37 +08:00
|
|
|
)
|
|
|
|
|
2020-10-24 02:50:19 +08:00
|
|
|
vcpkg_check_features(
|
|
|
|
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
|
|
FEATURES
|
|
|
|
dx12 BUILD_DX12
|
2017-01-11 22:42:37 +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-24 02:50:19 +08:00
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
PREFER_NINJA
|
2020-12-29 09:28:53 +08:00
|
|
|
OPTIONS ${FEATURE_OPTIONS} ${EXTRA_OPTIONS}
|
2017-01-11 22:42:37 +08:00
|
|
|
)
|
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)
|
2017-01-11 22:42:37 +08:00
|
|
|
|
2020-12-29 09:28:53 +08:00
|
|
|
if(NOT VCPKG_TARGET_IS_UWP)
|
2020-10-24 02:50:19 +08:00
|
|
|
vcpkg_copy_tools(
|
2020-12-29 09:28:53 +08:00
|
|
|
TOOL_NAMES meshconvert
|
2020-10-24 02:50:19 +08:00
|
|
|
SEARCH_DIR ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bin/CMake
|
|
|
|
)
|
2020-12-29 09:28:53 +08:00
|
|
|
|
|
|
|
elseif((VCPKG_HOST_IS_WINDOWS) AND (VCPKG_TARGET_ARCHITECTURE MATCHES x64))
|
|
|
|
vcpkg_download_distfile(meshconvert
|
|
|
|
URLS "https://github.com/Microsoft/DirectXMesh/releases/download/nov2020/meshconvert.exe"
|
|
|
|
FILENAME "meshconvert.exe"
|
|
|
|
SHA512 189552c74dc634f673a0d15851d7bb7c42c860023b1488086a9904323fc45207244c159c8848a211afafe258825f5051ee6fd85080da3f7f4afdf910764ca8ec
|
|
|
|
)
|
|
|
|
|
|
|
|
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/directxmesh/")
|
|
|
|
|
|
|
|
file(INSTALL
|
|
|
|
${DOWNLOADS}/meshconvert.exe
|
|
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/tools/directxmesh/)
|
2019-08-14 05:27:28 +08:00
|
|
|
endif()
|
2017-01-11 22:42:37 +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)
|