Instructions working on macOS Sonoma.

install homebrew with pkg installer from https://brew.sh/

eval "$(/opt/homebrew/bin/brew shellenv)"

install dependencies with:

brew install freetype fontconfig pkgconfig libtiff openjpeg boost
cd poppler

add to CMakeLists.txt

list(APPEND CMAKE_PREFIX_PATH "/Users/daniel/Qt/6.6.2/macos/lib/cmake/")
SET(ENABLE_NSS3 OFF)
SET(ENABLE_GPGME OFF)
SET(ENABLE_QT5 OFF)
SET(ENABLE_BOOST OFF)

change about line 80:

option(ENABLE_QT5 "Compile poppler qt5 wrapper." OFF)

change about line 225:

set(QT6_VERSION "6.6")
mkdir build
cd build
cmake ..
make
sudo make install