2020-04-08 11:16:24 +08:00
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY ONLY_DYNAMIC_CRT)
|
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-08-26 06:09:11 +08:00
|
|
|
REF aug2020
|
|
|
|
SHA512 4a116b6266070a075aca523d9439eeab878b5406ffe5f94f7c008d659842750eab17b11c027c7f1da1ed12a0b8a43ab53dc5aaea8477a0bb029654cd477b5424
|
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
|
|
|
)
|
|
|
|
|
2020-10-24 02:50:19 +08:00
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
PREFER_NINJA
|
|
|
|
OPTIONS ${FEATURE_OPTIONS}
|
2017-01-11 22:42:37 +08:00
|
|
|
)
|
2019-08-14 05:27:28 +08:00
|
|
|
|
2020-10-24 02:50:19 +08:00
|
|
|
if(NOT VCPKG_TARGET_IS_UWP AND NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
|
|
|
|
vcpkg_build_cmake()
|
|
|
|
else()
|
|
|
|
vcpkg_build_cmake(TARGET DirectXMesh)
|
|
|
|
endif()
|
2017-01-11 22:42:37 +08:00
|
|
|
|
2020-10-24 02:50:19 +08:00
|
|
|
file(INSTALL ${SOURCE_PATH}/DirectXMesh/DirectXMesh.h DESTINATION ${CURRENT_PACKAGES_DIR}/include)
|
|
|
|
file(INSTALL ${SOURCE_PATH}/DirectXMesh/DirectXMesh.inl DESTINATION ${CURRENT_PACKAGES_DIR}/include)
|
|
|
|
|
|
|
|
file(GLOB_RECURSE DEBUG_LIB ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/bin/CMake/*.lib)
|
|
|
|
file(GLOB_RECURSE RELEASE_LIB ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bin/CMake/*.lib)
|
|
|
|
file(INSTALL ${DEBUG_LIB} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
|
|
|
|
file(INSTALL ${RELEASE_LIB} DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
|
|
|
|
if(NOT VCPKG_TARGET_IS_UWP AND NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
|
|
|
|
vcpkg_copy_tools(
|
|
|
|
TOOL_NAMES Meshconvert
|
|
|
|
SEARCH_DIR ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bin/CMake
|
|
|
|
)
|
2019-08-14 05:27:28 +08:00
|
|
|
endif()
|
2017-01-11 22:42:37 +08:00
|
|
|
|
2019-10-11 22:52:19 +08:00
|
|
|
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|