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-13 12:01:37 +08:00
|
|
|
REF jan2021
|
|
|
|
SHA512 2e3950571703e48de083900e5f4ff94a6f882071969e48dd200ecbf7d8357f3131f647ba6ad97e7dcdbd3e051edad99521661738e7af73ca6f89e8715cd29f9c
|
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))
|
|
|
|
vcpkg_download_distfile(meshconvert
|
2021-01-13 12:01:37 +08:00
|
|
|
URLS "https://github.com/Microsoft/DirectXMesh/releases/download/jan2021/meshconvert.exe"
|
2020-12-29 09:28:53 +08:00
|
|
|
FILENAME "meshconvert.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
|
|
|
|
${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)
|