vcpkg/ports/mmloader/fix-platform-name.patch
JonLiu1993 e21c414460
[mmloader] Fix feature shellcode Build failure (#33373)
* [mmloader] Fix build failure

* update version

* Add missing double quotes

* update version

* fix error

* update version

---------

Co-authored-by: Zhao Liu <v-zhli17@microsoft.com>
2023-08-29 16:21:36 -07:00

19 lines
742 B
Diff

diff --git a/CMakeLists.txt b/CMakeLists.txt
index b672037..f9a6a15 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -14,6 +14,13 @@ if ((NOT DEFINED CMAKE_VS_PLATFORM_NAME) OR (CMAKE_VS_PLATFORM_NAME STREQUAL "")
message(STATUS "CMAKE_VS_PLATFORM_NAME is empty, use default: Win32")
set(CMAKE_VS_PLATFORM_NAME Win32)
endif()
+
+if(VCPKG_TARGET_ARCHITECTURE MATCHES "x86")
+ set(CMAKE_VS_PLATFORM_NAME "Win32")
+else()
+ set(CMAKE_VS_PLATFORM_NAME "${VCPKG_TARGET_ARCHITECTURE}")
+endif()
+
message(STATUS "CMAKE_VS_PLATFORM_NAME=" ${CMAKE_VS_PLATFORM_NAME})
string(COMPARE EQUAL "${CMAKE_VS_PLATFORM_NAME}" Win32 BUILD_ARC_X8632)
string(COMPARE EQUAL "${CMAKE_VS_PLATFORM_NAME}" x64 BUILD_ARC_X8664)