From a3a8205cc0dbcf44a2a774b204e4e9805e3bbc31 Mon Sep 17 00:00:00 2001 From: Martin Ridgers Date: Thu, 13 Jan 2022 14:10:38 +0100 Subject: Added instructions for building on Mac --- README.md | 35 +++++++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 8 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 0e574c555..57e43b62e 100644 --- a/README.md +++ b/README.md @@ -97,25 +97,44 @@ Clone the Zen project and tell `xmake` to use the correct GCC version; ``` git clone https://github.com/EpicGames/zen.git ~/zen/main cd ~/zen/main -xmake config --plat=linux --cxx=g++-11 --cc=gcc-11 [--mode=debug] ``` -The `--mode=debug` is optionally required to change the build variant. This -cannot be done when executing the build and the setting of configuration options -can not be composed across multiple `xmake config` calls. - Now we are ready to build Zen. The `-y` skips `xmake` from prompting about updating `vcpkg` packages; ``` -xmake build -y +xmake config -y --mode=debug +xmake build ``` -The `xmake` flags `-vD` can be useful to diagnose `xmake` issues. +Note that the command above to set the build variant to debug is optional. Tests +are only built in debug.The `xmake` flags `-vD` can be useful to diagnose +`xmake` issues. ## Building on Mac -... coming soon +Building on Mac is very similar to Linux; install xmake, clone vcpkg and Zen and +then build the project. Here is a short summary; + +``` +## vcpkg +git clone https://github.com/microsoft/vcpkg.git ~/zen/vcpkg +~/zen/vcpkg/bootstrap-vcpkg.sh +~/zen/vcpkg/vcpkg --version + +## xmake +curl -L https://github.com/xmake-io/xmake/releases/download/v2.6.2/xmake-v2.6.2.macosx.pkg > xmake-v2.6.2.macosx.pkg +sudo installer -pkg xmake-v2.6.2.macosx.pkg -target / + +## Zen +git clone https://github.com/EpicGames/zen.git ~/zen/main +cd ~/zen/main + +## Build +export VCPKG_ROOT=~/zen/vcpkg +xmake config -y --mode=debug --arch=x86_64 +xmake build +``` # Implementation Notes -- cgit v1.2.3