Skip to content

Commit f934885

Browse files
Handle macOS target triplet (#538)
* Add diagnostic information when determiing the triplet fails in vcpkg-setup.cmake * Set vcpkg target triplet for macOS
1 parent 2a14159 commit f934885

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

cmake/vcpkg-setup.cmake

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,16 @@ if (NOT DEFINED VCPKG_TARGET_TRIPLET)
4242
endif ()
4343

4444
set (SIMH_VCPKG_PLATFORM "linux")
45+
elseif (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
46+
set(SIMH_VCPKG_PLATFORM "osx")
47+
if (CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "arm64")
48+
set(SIMH_VCPKG_ARCH "arm64")
49+
else()
50+
set(SIMH_VCPKG_ARCH "x64")
51+
endif()
4552
else ()
53+
message(STATUS "CMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME}")
54+
message(STATUS "CMAKE_HOST_SYSTEM_PROCESSOR=${CMAKE_HOST_SYSTEM_PROCESSOR}")
4655
message(FATAL_ERROR "Could not determine VCPKG platform and system triplet."
4756
"\n"
4857
"(a) Are you sure that VCPKG is usable on this system? Check VCPKG_ROOT and ensure that"

0 commit comments

Comments
 (0)