Skip to content

M0ssi-P/mpv-macbuild

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

70 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mpv macbuild

Build instructions for creating a macOS libmpv supporting both Apple Silicon and Intel.

Requirements

  • macOS with Xcode command line tools installed
  • Homebrew
  • Python 3
  • Git

Setup

  1. Clone the repository:
git clone https://github.com/user1/mpv-macbuild.git
cd mpv-macbuild
  1. Install dependencies:
brew install python3 pkg-config meson ninja yasm libarchive libsndfile libjpeg-turbo libpng libvpx libx264 libx265 libopus libfreetype

Build libmpv

Create separate build directories for Apple Silicon and Intel to produce universal libraries.

mkdir -p build-arm64 build-x86_64

Build Apple Silicon

cd build-arm64
export CFLAGS='-arch arm64'
export CXXFLAGS='-arch arm64'
export LDFLAGS='-arch arm64'
meson setup --buildtype=release --prefix=/usr/local ../mpv
ninja
ninja install
cd ..

Build Intel

cd build-x86_64
export CFLAGS='-arch x86_64'
export CXXFLAGS='-arch x86_64'
export LDFLAGS='-arch x86_64'
meson setup --buildtype=release --prefix=/usr/local ../mpv
ninja
ninja install
cd ..

Create a universal libmpv

mkdir -p universal/lib
lipo -create build-arm64/usr/local/lib/libmpv.dylib build-x86_64/usr/local/lib/libmpv.dylib -output universal/lib/libmpv.dylib

Notes

  • Adjust dependency list as needed for your mpv configuration.
  • Use meson configure to enable or disable specific mpv options.
  • The universal library can be packaged with headers from the installed build.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Packages

 
 
 

Contributors