diff --git a/Scripts/Ports/python3/portfile.cmake b/Scripts/Ports/python3/portfile.cmake index 7da8f1b1db..44c3100eb2 100644 --- a/Scripts/Ports/python3/portfile.cmake +++ b/Scripts/Ports/python3/portfile.cmake @@ -273,6 +273,10 @@ else() list(APPEND OPTIONS "LDFLAGS=\${LDFLAGS//-Wl,--no-undefined/}") endif() endif() + + if(VCPKG_TARGET_IS_OSX AND VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") + list(APPEND OPTIONS "LDFLAGS_NODIST=-rpath /opt/homebrew/lib") + endif() vcpkg_configure_make( SOURCE_PATH "${SOURCE_PATH}"