2020-12-29 09:28:53 +08:00
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
|
|
|
2021-01-13 12:01:37 +08:00
|
|
|
vcpkg_fail_port_install(ON_TARGET "OSX")
|
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
|
2021-01-16 07:24:06 +08:00
|
|
|
REF jan2021b
|
|
|
|
SHA512 dab353d5033c32cf5667b95820cf3048e4773fa3fed16d24b25a515fbf4b6f6792ab5955dc9bb790c911b4cae1af1166aa0fdc4f5a639b3f4c3c81a2451a9a40
|
2017-12-23 22:50:33 +08:00
|
|
|
HEAD_REF master
|
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
|
|
|
)
|
|
|
|
|
2021-01-13 12:01:37 +08:00
|
|
|
if (VCPKG_HOST_IS_LINUX)
|
|
|
|
message(WARNING "Build ${PORT} requires GCC version 9 or later")
|
|
|
|
endif()
|
|
|
|
|
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
|
|
|
|
2021-01-13 12:01:37 +08:00
|
|
|
if((VCPKG_TARGET_IS_WINDOWS) AND (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))
|
2021-01-16 07:24:06 +08:00
|
|
|
vcpkg_download_distfile(
|
|
|
|
MESHCONVERT_EXE
|
2021-01-13 12:01:37 +08:00
|
|
|
URLS "https://github.com/Microsoft/DirectXMesh/releases/download/jan2021/meshconvert.exe"
|
2021-01-16 07:24:06 +08:00
|
|
|
FILENAME "meshconvert-jan2021.exe"
|
2021-01-13 12:01:37 +08:00
|
|
|
SHA512 7df51baa495859aab418d194fd885cf37945ec2927122c18718b3a1a7d7ceb08c6853d084d74bf2bf2bc9ace47a351fd6b8d03706507f4966111ec1cb83f43a2
|
2020-12-29 09:28:53 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/directxmesh/")
|
|
|
|
|
|
|
|
file(INSTALL
|
2021-01-16 07:24:06 +08:00
|
|
|
${MESHCONVERT_EXE}
|
2020-12-29 09:28:53 +08:00
|
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/tools/directxmesh/)
|
2021-01-16 07:24:06 +08:00
|
|
|
|
|
|
|
file(RENAME ${CURRENT_PACKAGES_DIR}/tools/directxmesh/meshconvert-jan2021.exe ${CURRENT_PACKAGES_DIR}/tools/directxmesh/meshconvert.exe)
|
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)
|