aboutsummaryrefslogtreecommitdiff
path: root/ports/directxtk12
diff options
context:
space:
mode:
authorRT222 <contact@rt2.fr>2019-08-13 23:27:28 +0200
committerPhil Christensen <philc@microsoft.com>2019-08-13 14:27:28 -0700
commit56136b326897dc36d172e13f712879cca127932e (patch)
tree50670cdb5794e2d860bc95d8f0e6471f6fe80bbd /ports/directxtk12
parent86ec91b6ee56ab59a03d966fc3e38e74f4382874 (diff)
downloadvcpkg-56136b326897dc36d172e13f712879cca127932e.tar.gz
vcpkg-56136b326897dc36d172e13f712879cca127932e.zip
[directxtk][directxtk12][directxmesh][directxtex] Updated to June version and improved platform toolset support (#7665)
* [directxtk][directxtk12][directxmesh][directxtex] Updated to June version and improved platform toolset support * [directxtk12] Fixed build error on x86 platform * [directxmesh][directxtex] Fixed UWP builds failure
Diffstat (limited to 'ports/directxtk12')
-rw-r--r--ports/directxtk12/CONTROL2
-rw-r--r--ports/directxtk12/portfile.cmake51
2 files changed, 35 insertions, 18 deletions
diff --git a/ports/directxtk12/CONTROL b/ports/directxtk12/CONTROL
index 466acece6..2d7c849c2 100644
--- a/ports/directxtk12/CONTROL
+++ b/ports/directxtk12/CONTROL
@@ -1,4 +1,4 @@
Source: directxtk12
-Version: dec2016-1
+Version: jun2019-1
Homepage: https://github.com/Microsoft/DirectXTK12
Description: A collection of helper classes for writing DirectX 12 code in C++.
diff --git a/ports/directxtk12/portfile.cmake b/ports/directxtk12/portfile.cmake
index d51a82b81..114165fb4 100644
--- a/ports/directxtk12/portfile.cmake
+++ b/ports/directxtk12/portfile.cmake
@@ -3,19 +3,15 @@ include(vcpkg_common_functions)
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
if(NOT VCPKG_CRT_LINKAGE STREQUAL "dynamic")
- message(FATAL_ERROR "DirectXTk12 only supports dynamic CRT linkage")
+ message(FATAL_ERROR "DirectXTK12 only supports dynamic CRT linkage")
endif()
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/DirectXTK12-dec2016)
-vcpkg_download_distfile(ARCHIVE
- URLS "https://github.com/Microsoft/DirectXTK12/archive/dec2016.tar.gz"
- FILENAME "DirectXTK12-dec2016.tar.gz"
- SHA512 7c98fbf1d7ef96807a38d396a87dacdc60fdcd7e461210d246cc424789c4c5c5fb1390db958c1bd1f77da8af756a9eae36813e5da6bbb0ea1432ff4004f1d010
-)
-vcpkg_extract_source_archive(${ARCHIVE})
-
-vcpkg_build_msbuild(
- PROJECT_PATH ${SOURCE_PATH}/DirectXTK_Desktop_2015_Win10.sln
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO Microsoft/DirectXTK12
+ REF jun2019
+ SHA512 f635746ff92cf3b60b96f74f5ada5fb8409d1ac6e2729d24ebf0ebb275e26d373ec0ccdfbb66a3cb967267da86de4d70304d1f3326b738f94f5a8fc0d43a8c97
+ HEAD_REF master
)
IF (TRIPLET_SYSTEM_ARCH MATCHES "x86")
@@ -24,17 +20,38 @@ ELSE()
SET(BUILD_ARCH ${TRIPLET_SYSTEM_ARCH})
ENDIF()
-file(INSTALL
- ${SOURCE_PATH}/Bin/Desktop_2015_Win10/${BUILD_ARCH}/Release/DirectXTK12.lib
- DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
-file(INSTALL
- ${SOURCE_PATH}/Bin/Desktop_2015_Win10/${BUILD_ARCH}/Debug/DirectXTK12.lib
- DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
+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()
+
+if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
+ set(SLN_NAME "Windows10_${VS_VERSION}")
+else()
+ set(SLN_NAME "Desktop_${VS_VERSION}_Win10")
+endif()
+
+vcpkg_build_msbuild(
+ PROJECT_PATH ${SOURCE_PATH}/DirectXTK_${SLN_NAME}.sln
+)
file(INSTALL
${SOURCE_PATH}/Inc/
DESTINATION ${CURRENT_PACKAGES_DIR}/include/DirectXTK12
)
+file(INSTALL
+ ${SOURCE_PATH}/Bin/${SLN_NAME}/${BUILD_ARCH}/Release/DirectXTK12.lib
+ DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
+
+file(INSTALL
+ ${SOURCE_PATH}/Bin/${SLN_NAME}/${BUILD_ARCH}/Debug/DirectXTK12.lib
+ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
+
# Handle copyright
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/directxtk12 RENAME copyright)