Install dependencies on macOS via Homebrew - GenericMappingTools/gmt GitHub Wiki
For macOS with Homebrew installed, you can install the dependencies with:
# Install necessary dependencies
brew install cmake curl netcdf
# Install optional dependencies
brew install ninja gdal pcre2 fftw glib ghostscript
# to enable movie-making
brew install graphicsmagick ffmpeg
# to enable testing
brew install graphicsmagick
# to build the documentation
brew install sphinx-doc
# You also need to add sphinx-doc's bin to your PATH
echo 'export PATH="$(brew --prefix)/opt/sphinx-doc/bin:$PATH"' >> ~/.zshrc