aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwangli28 <wangli28@beyondsoft.com>2020-04-08 03:16:24 +0000
committerwangli28 <wangli28@beyondsoft.com>2020-04-08 03:16:59 +0000
commit3229d17dc8572c2f7c45008214c92813025376c0 (patch)
treeb762a6b8846932db1f1debbc78f3fc6462abe47f
parenta3a6e703448b58b0d86ff4b6b5f658b8d26cd76d (diff)
downloadvcpkg-3229d17dc8572c2f7c45008214c92813025376c0.tar.gz
vcpkg-3229d17dc8572c2f7c45008214c92813025376c0.zip
[DirectXMesh] Add support build for DirectX12
-rw-r--r--ports/directxmesh/CONTROL2
-rw-r--r--ports/directxmesh/portfile.cmake18
2 files changed, 12 insertions, 8 deletions
diff --git a/ports/directxmesh/CONTROL b/ports/directxmesh/CONTROL
index 696022ea3..bb3195ea6 100644
--- a/ports/directxmesh/CONTROL
+++ b/ports/directxmesh/CONTROL
@@ -1,4 +1,4 @@
Source: directxmesh
-Version: dec2019
+Version: dec2019-1
Homepage: https://walbourn.github.io/directxmesh
Description: DirectXMesh geometry processing library \ No newline at end of file
diff --git a/ports/directxmesh/portfile.cmake b/ports/directxmesh/portfile.cmake
index 7e43ad07f..43ab540a2 100644
--- a/ports/directxmesh/portfile.cmake
+++ b/ports/directxmesh/portfile.cmake
@@ -1,10 +1,4 @@
-include(vcpkg_common_functions)
-
-vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
-
-if(NOT VCPKG_CRT_LINKAGE STREQUAL "dynamic")
- message(FATAL_ERROR "DirectXMesh only supports dynamic CRT linkage")
-endif()
+vcpkg_check_linkage(ONLY_STATIC_LIBRARY ONLY_DYNAMIC_CRT)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
@@ -37,6 +31,16 @@ else()
set(SLN_NAME "Desktop_${VS_VERSION}_Win10")
else()
set(SLN_NAME "Desktop_${VS_VERSION}")
+
+ # fix solution file to include DirectX 12 in build
+ file(READ ${SOURCE_PATH}/DirectXMesh/DirectXMesh_${SLN_NAME}.vcxproj _contents)
+ string(REPLACE "_WIN32_WINNT=0x0601" "_WIN32_WINNT=0x0A00" _contents "${_contents}")
+ file(WRITE ${SOURCE_PATH}/DirectXMesh/DirectXMesh_${SLN_NAME}.vcxproj "${_contents}")
+
+ # fix solution file to include DirectX 12 in build
+ file(READ ${SOURCE_PATH}/Meshconvert/Meshconvert_${SLN_NAME}.vcxproj _contents)
+ string(REPLACE "_WIN32_WINNT=0x0601" "_WIN32_WINNT=0x0A00" _contents "${_contents}")
+ file(WRITE ${SOURCE_PATH}/Meshconvert/Meshconvert_${SLN_NAME}.vcxproj "${_contents}")
endif()
endif()