Can not build Urho3D on mac

I downloaded the latest source and try to build for mac platform, but failed.
this is the failing log:

ld: warning: ignoring file /usr/local/Cellar/readline/8.1/lib/libreadline.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
Undefined symbols for architecture arm64:
“_add_history”, referenced from:
_dotty in lua.o
“_readline”, referenced from:
_pushline in lua.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Ld build/macos/Source/ThirdParty/Lua/ normal x86_64
cd /Users/att/Work/Engines/Urho3D_Engine/Urho3D_Original
/Applications/ -target x86_64-apple-macos11.5 -isysroot /Applications/ -L/Users/att/Work/Engines/Urho3D_Engine/Urho3D_Original/build/macos/bin -F/Users/att/Work/Engines/Urho3D_Engine/Urho3D_Original/build/macos/bin -filelist /Users/att/Work/Engines/Urho3D_Engine/Urho3D_Original/build/macos/Source/ThirdParty/Lua/ -Wl,-search_paths_first -Wl,-headerpad_max_install_names /Users/att/Work/Engines/Urho3D_Engine/Urho3D_Original/build/macos/Source/ThirdParty/Lua/Release/libLua.a -lm /usr/local/Cellar/readline/8.1/lib/libreadline.dylib -Xlinker -dependency_info -Xlinker /Users/att/Work/Engines/Urho3D_Engine/Urho3D_Original/build/macos/Source/ThirdParty/Lua/ -o /Users/att/Work/Engines/Urho3D_Engine/Urho3D_Original/build/macos/Source/ThirdParty/Lua/


build env is:
macos big sur 11.5.2
xcode 12.5.1
cmake 3.20.0

compiled with command: rake install build

Is there a prebuilt binary for Mac? Just curious

This thread could be a duplicate of another. Use the provided “” script as it contains a crucial instruction to tell CMake to generate the Xcode project in legacy build system mode, which unfortunately the project is stuck with for now.