Meson buildsystem cannot find GLEW shared module

I’m trying to pack my game into a flatpak, my game originally builds using Meson and depends on GLEW, I added GLEW using the shared modules repo, I have the following in my manifest file:

modules:
  - shared-modules/glew/glew.json

And my game module:

  - name: antware
    buildsystem: meson
    sources:
      - type: dir
        path: .

Now I know that GLEW is getting built in the flatpak-builder directory, but I’ve noticed that the pkgconfig file is getting installed in “flatpak-build/files/lib/pkgconfig/glew.pc” so maybe Meson doesn’t search in this directory

So I guess you’re getting an error?

Yes, simply what Meson returns when it cannot find some package:

Found pkg-config: /usr/bin/pkg-config (2.0.2)
Found CMake: /usr/bin/cmake (3.27.6)
Run-time dependency glew found: NO (tried pkgconfig and cmake)

Hard to tell without more context, https://github.com/flathub/uk.me.doof.Lander/blob/201c5f58f48d85e35960495c744336d888f7a346/uk.me.doof.Lander.json#L17 suggests it should work fine

No it’s not. This doesn’t exist in the build environment.

I couldn’t find any notable difference between his build script, manifest and mine

Anyway I’ve published the branch containing the project + the Flatpak manifest: GitHub - YamanQD/AntWare at flatpak-support-setup

Adding

- shared-modules/glu/glu-9.json

allows meson to find glew it seems.

But it then fails on sfml-all so I guess your setup for that isn’t complete?

Yeah it seems to do it, thanks.

I wasn’t sure that it was working, and yeah Meson doesn’t find sfml-all, I’ll try to fix that