2017-12-23 22:50:33 +08:00
|
|
|
include(vcpkg_common_functions)
|
|
|
|
|
2019-05-03 13:57:43 +08:00
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
2017-01-11 22:42:37 +08:00
|
|
|
|
2017-06-10 10:34:07 +08:00
|
|
|
if(NOT VCPKG_CRT_LINKAGE STREQUAL "dynamic")
|
|
|
|
message(FATAL_ERROR "DirectXMesh only supports dynamic CRT linkage")
|
|
|
|
endif()
|
|
|
|
|
2017-12-23 22:50:33 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO Microsoft/DirectXMesh
|
2019-05-09 08:51:44 +08:00
|
|
|
REF apr2019
|
|
|
|
SHA512 a9e0dbf6483633a1727592de7e2fa733de993daff848d9ec2241ce54b67c7d24ed0419058f2f6ce256021dcf7e16d178b62ed9b8c7a1756504ab044f8740be1d
|
2017-12-23 22:50:33 +08:00
|
|
|
HEAD_REF master
|
2017-01-11 22:42:37 +08:00
|
|
|
)
|
|
|
|
|
2017-01-13 13:53:37 +08:00
|
|
|
IF (TRIPLET_SYSTEM_ARCH MATCHES "x86")
|
2017-01-13 18:21:16 +08:00
|
|
|
SET(BUILD_ARCH "Win32")
|
2017-01-13 13:53:37 +08:00
|
|
|
ELSE()
|
2017-01-13 18:21:16 +08:00
|
|
|
SET(BUILD_ARCH ${TRIPLET_SYSTEM_ARCH})
|
2017-01-11 22:42:37 +08:00
|
|
|
ENDIF()
|
|
|
|
|
2017-01-13 13:53:37 +08:00
|
|
|
vcpkg_build_msbuild(
|
2017-12-23 22:50:33 +08:00
|
|
|
PROJECT_PATH ${SOURCE_PATH}/DirectXMesh_Desktop_2017.sln
|
2017-01-13 18:21:16 +08:00
|
|
|
PLATFORM ${BUILD_ARCH}
|
2017-01-11 22:42:37 +08:00
|
|
|
)
|
|
|
|
|
2017-01-13 13:53:37 +08:00
|
|
|
file(INSTALL
|
2017-01-13 18:21:16 +08:00
|
|
|
${SOURCE_PATH}/DirectXMesh/DirectXMesh.h
|
|
|
|
${SOURCE_PATH}/DirectXMesh/DirectXMesh.inl
|
2017-01-13 13:53:37 +08:00
|
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/include
|
2017-01-11 22:42:37 +08:00
|
|
|
)
|
2017-01-13 13:53:37 +08:00
|
|
|
file(INSTALL
|
2017-12-23 22:50:33 +08:00
|
|
|
${SOURCE_PATH}/DirectXMesh/Bin/Desktop_2017/${BUILD_ARCH}/Debug/DirectXMesh.lib
|
2017-01-13 18:21:16 +08:00
|
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
|
2017-01-13 13:53:37 +08:00
|
|
|
file(INSTALL
|
2017-12-23 22:50:33 +08:00
|
|
|
${SOURCE_PATH}/DirectXMesh/Bin/Desktop_2017/${BUILD_ARCH}/Release/DirectXMesh.lib
|
2017-01-13 18:21:16 +08:00
|
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
|
2017-01-11 22:42:37 +08:00
|
|
|
|
|
|
|
set(TOOL_PATH ${CURRENT_PACKAGES_DIR}/tools)
|
2017-01-13 13:53:37 +08:00
|
|
|
file(INSTALL
|
2017-12-23 22:50:33 +08:00
|
|
|
${SOURCE_PATH}/Meshconvert/Bin/Desktop_2017/${BUILD_ARCH}/Release/Meshconvert.exe
|
2017-01-13 18:21:16 +08:00
|
|
|
DESTINATION ${TOOL_PATH})
|
2017-01-11 22:42:37 +08:00
|
|
|
|
|
|
|
# Handle copyright
|
|
|
|
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/directxmesh)
|
|
|
|
file(RENAME ${CURRENT_PACKAGES_DIR}/share/directxmesh/LICENSE ${CURRENT_PACKAGES_DIR}/share/directxmesh/copyright)
|