2020-06-11 17:41:20 +08:00
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY ONLY_DYNAMIC_CRT)
|
2017-06-10 10:34:07 +08:00
|
|
|
|
2017-12-23 22:51:17 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO Microsoft/DirectXTK
|
2020-07-10 03:33:08 +08:00
|
|
|
REF jul2020
|
|
|
|
SHA512 e1e77795c12e82d12f491b19b43353b0f7e9cce6343a648728d083e63ae369404029344168b84d6a5162b74c1db4ee5160cd5e01aef26c7fad2ee890e26f41c0
|
2017-12-23 22:51:17 +08:00
|
|
|
HEAD_REF master
|
2016-11-25 17:37:48 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
IF (TRIPLET_SYSTEM_ARCH MATCHES "x86")
|
2018-02-26 03:37:23 +08:00
|
|
|
SET(BUILD_ARCH "Win32")
|
2016-11-25 17:37:48 +08:00
|
|
|
ELSE()
|
2018-02-26 03:37:23 +08:00
|
|
|
SET(BUILD_ARCH ${TRIPLET_SYSTEM_ARCH})
|
2016-11-25 17:37:48 +08:00
|
|
|
ENDIF()
|
|
|
|
|
2019-08-14 05:27:28 +08:00
|
|
|
if (VCPKG_PLATFORM_TOOLSET STREQUAL "v140")
|
|
|
|
set(VS_VERSION "2015")
|
|
|
|
elseif (VCPKG_PLATFORM_TOOLSET STREQUAL "v141")
|
|
|
|
set(VS_VERSION "2017")
|
|
|
|
elseif (VCPKG_PLATFORM_TOOLSET STREQUAL "v142")
|
|
|
|
set(VS_VERSION "2019")
|
|
|
|
else()
|
|
|
|
message(FATAL_ERROR "Unsupported platform toolset.")
|
|
|
|
endif()
|
|
|
|
|
2019-12-21 08:21:10 +08:00
|
|
|
if(VCPKG_TARGET_IS_UWP)
|
2019-08-14 05:27:28 +08:00
|
|
|
set(SLN_NAME "Windows10_${VS_VERSION}")
|
2019-07-19 04:50:50 +08:00
|
|
|
else()
|
2019-12-21 08:21:10 +08:00
|
|
|
if(TRIPLET_SYSTEM_ARCH STREQUAL "arm64")
|
|
|
|
set(SLN_NAME "Desktop_${VS_VERSION}_Win10")
|
|
|
|
else()
|
|
|
|
set(SLN_NAME "Desktop_${VS_VERSION}")
|
|
|
|
endif()
|
2019-07-19 04:50:50 +08:00
|
|
|
endif()
|
|
|
|
|
2016-11-25 17:37:48 +08:00
|
|
|
vcpkg_build_msbuild(
|
2019-07-19 04:50:50 +08:00
|
|
|
PROJECT_PATH ${SOURCE_PATH}/DirectXTK_${SLN_NAME}.sln
|
2020-06-11 17:41:20 +08:00
|
|
|
PLATFORM ${TRIPLET_SYSTEM_ARCH}
|
2016-11-25 17:37:48 +08:00
|
|
|
)
|
|
|
|
|
2019-08-14 05:27:28 +08:00
|
|
|
file(INSTALL
|
2020-01-03 05:28:13 +08:00
|
|
|
${SOURCE_PATH}/Inc/
|
|
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/include/DirectXTK
|
2019-08-14 05:27:28 +08:00
|
|
|
)
|
|
|
|
|
2016-11-25 17:37:48 +08:00
|
|
|
file(INSTALL
|
2019-07-19 04:50:50 +08:00
|
|
|
${SOURCE_PATH}/Bin/${SLN_NAME}/${BUILD_ARCH}/Release/DirectXTK.lib
|
2019-10-11 22:52:19 +08:00
|
|
|
${SOURCE_PATH}/Bin/${SLN_NAME}/${BUILD_ARCH}/Release/DirectXTK.pdb
|
2018-02-26 03:37:23 +08:00
|
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
|
2016-11-25 17:37:48 +08:00
|
|
|
|
|
|
|
file(INSTALL
|
2019-07-19 04:50:50 +08:00
|
|
|
${SOURCE_PATH}/Bin/${SLN_NAME}/${BUILD_ARCH}/Debug/DirectXTK.lib
|
2019-10-11 22:52:19 +08:00
|
|
|
${SOURCE_PATH}/Bin/${SLN_NAME}/${BUILD_ARCH}/Debug/DirectXTK.pdb
|
2018-02-26 03:37:23 +08:00
|
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
|
2016-11-25 17:37:48 +08:00
|
|
|
|
2019-12-21 08:21:10 +08:00
|
|
|
if(NOT VCPKG_TARGET_IS_UWP)
|
2019-08-14 05:27:28 +08:00
|
|
|
set(DXTK_TOOL_PATH ${CURRENT_PACKAGES_DIR}/tools/directxtk)
|
|
|
|
file(MAKE_DIRECTORY ${DXTK_TOOL_PATH})
|
|
|
|
file(INSTALL
|
|
|
|
${SOURCE_PATH}/MakeSpriteFont/bin/Release/MakeSpriteFont.exe
|
|
|
|
DESTINATION ${DXTK_TOOL_PATH})
|
|
|
|
file(INSTALL
|
2019-12-21 08:21:10 +08:00
|
|
|
${SOURCE_PATH}/XWBTool/Bin/Desktop_${VS_VERSION}/${BUILD_ARCH}/Release/XWBTool.exe
|
2019-08-14 05:27:28 +08:00
|
|
|
DESTINATION ${DXTK_TOOL_PATH})
|
2019-07-19 04:50:50 +08:00
|
|
|
endif()
|
2016-11-25 17:37:48 +08:00
|
|
|
|
2019-10-11 22:52:19 +08:00
|
|
|
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|