Skip to content

Commit

Permalink
Merge pull request microsoft#50 from fwcd/arm64-osx-qt-mkspec
Browse files Browse the repository at this point in the history
Set `VCPKG_QT_HOST_MKSPEC` on arm64 macOS hosts explicitly
  • Loading branch information
daschuer authored Sep 24, 2022
2 parents f9cdab3 + e6bfd7b commit 727757e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions overlay/osx/qt5-base/cmake/find_qt_mkspec.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ function(find_qt_mkspec TARGET_PLATFORM_MKSPEC_OUT HOST_PLATFORM_MKSPEC_OUT EXT_
#elseif("${CMAKE_HOST_SYSTEM}" STREQUAL "Darwin")
# set(_tmp_host_out "macx-clang")
#endif()
if(HOST_TRIPLET MATCHES "^arm64-osx")
# When compiling on Apple Silicon (arm64 macOS) hosts we need to
# set the host mkspec explicitly (since find_qt_mkspec won't do that
# for us and Qt 5.12's build system will default to using Rosetta otherwise).
set(_tmp_host_out "macx-aarch64-clang")
endif()
if(DEFINED _tmp_host_out)
message(STATUS "Host mkspec set to: ${_tmp_host_out}")
else()
Expand Down
1 change: 1 addition & 0 deletions overlay/osx/qt5-base/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ include(install_qt)

#########################
## Find Host and Target mkspec name for configure

include(find_qt_mkspec)
find_qt_mkspec(TARGET_MKSPEC HOST_MKSPEC HOST_TOOLS)
set(QT_PLATFORM_CONFIGURE_OPTIONS TARGET_PLATFORM ${TARGET_MKSPEC})
Expand Down

0 comments on commit 727757e

Please sign in to comment.