mirror of https://github.com/PCSX2/pcsx2.git
Updated 11 Building on MacOS (markdown)
parent
39e3eb429e
commit
57832687f2
|
@ -2,31 +2,20 @@
|
|||
|
||||
Reminder: Don't forget to checkout submodules! `git submodule update --init --recursive` in the source directory if you're not sure whether you've done it or not.
|
||||
|
||||
Dependencies:
|
||||
- libpng
|
||||
- libjpeg
|
||||
- qt6 (`qt6` on Homebrew, `qt6-qtbase`, `qt6-qtsvg`, and `qt6-qttools` on MacPorts)
|
||||
|
||||
The following dependencies will be built from submodules if not found, but installing them can speed up builds:
|
||||
- zstd
|
||||
- libzip
|
||||
- sdl2
|
||||
- rapidyaml
|
||||
- fmt
|
||||
|
||||
# Building on an Intel Mac
|
||||
|
||||
Building on an Intel Mac should work similarly to building on Linux. Run cmake with `cmake /path/to/pcsx2/source -DCMAKE_BUILD_TYPE=Release`, then `make`. The final `.app` will be in `pcsx2-qt/PCSX2.app` in the build directory.
|
||||
Build the dependencies using the CI's build script: `.github/workflows/scripts/macos/build-dependencies.sh deps` (this will build the dependencies into the directory `deps`). If you want to use a package manager, you can look at the install script to see the required dependencies.
|
||||
|
||||
Building on an Intel Mac should work similarly to building on Linux. Run cmake with `cmake /path/to/pcsx2/source -DCMAKE_PREFIX_PATH=/path/to/deps -DCMAKE_BUILD_TYPE=Release`, then `make`. The final `.app` will be in `pcsx2-qt/PCSX2.app` in the build directory. (The `CMAKE_PREFIX_PATH` is only needed if you used the CI's build script to install dependencies.)
|
||||
|
||||
# Building on an arm (Apple Silicon) Mac
|
||||
|
||||
**PCSX2 does not support building for arm. You will need to make Intel builds even on Apple Silicon and run them in Rosetta.**
|
||||
|
||||
You will need Intel versions of all the dependencies. **Dependencies from Homebrew will not work.** If you use MacPorts, install your packages with `+universal`. Note that we don't link to any libraries from `qt6-qttools`, so you can skip the universal on that one (and it links with libclang, so I'd recommend skipping it unless you really want to sit around while MacPorts builds a universal build of clang and llvm). If you don't use MacPorts, you'll need to build manually. You can use the [CI's dependency installation script](https://github.com/PCSX2/pcsx2/blob/master/.github/workflows/scripts/macos/build-dependencies.sh) as reference, just add `-DCMAKE_OSX_ARCHITECTURES=x86_64;arm64` on cmake stuff (e.g. qt) and `CC="clang -arch x86_64 -arch arm64" CXX="clang -arch x86_64 -arch arm64"` for autotools things.
|
||||
You will need Intel versions of all the dependencies. **Dependencies from Homebrew will not work.** The dependency build script will handle this for you (see Intel instructions). If you use MacPorts, install your packages with `+universal`. Note that we don't link to any libraries from `qt6-qttools`, so you can skip the universal on that one (and it links with libclang, so I'd recommend skipping it unless you really want to sit around while MacPorts builds a universal build of clang and llvm).
|
||||
|
||||
Add the following extra flags to the cmake invocation listed in the Intel Mac section:
|
||||
- `-DCMAKE_OSX_ARCHITECTURES=x86_64`. This tells cmake to do an Intel build even though you're on an arm Mac.
|
||||
- `-DARCH_FLAG=""`. This overrides our default setting of `-march=native`, which doesn't work when building Intel builds from Apple Silicon.
|
||||
|
||||
# Building for development
|
||||
|
||||
|
|
Loading…
Reference in New Issue