Meson can't find poppler-glib

Hello, I’m new to this community, so please redirect me if this is not the right place for this.

I’m attempting to add poppler-glib to a gnome builder project, but Gnome Builder doesn’t seem to be able to find the package. I have verified that pkg-config is able to locate it:

ian@arch ~/D/G/o/src (master)> pkg-config --modversion poppler-glib
25.05.0

I’ve added the dependency to the relevant meson.build file:

obscura_deps = [
  dependency('poppler-glib'),
  dependency('gtk4'),
  dependency('libadwaita-1', version: '>= 1.4'),
]

This is the build output:

Run-time dependency poppler-glib found: NO (tried pkgconfig and cmake)

../../../../../obscura/src/meson.build:8:2: ERROR: Dependency "poppler-glib" not found, tried pkgconfig and cmake

Check the Configure Project… dialog (keyboard shortcut: Alt+,). You’re surely building using a Flatpak manifest or container of some sort, rather than your host system.

That seemed to work - I switched from the generated configuration to the default configuration. Is that recommended? Could you point me towards resources that would help me set up poppler-glib in a flatpak env?

You can have a look at Evince flatpak manifest and how it builds Poppler:
build-aux/flatpak/org.gnome.Evince.json · main · GNOME / evince · GitLab