I think want you want is mostly the platform snap model, e.g. gnome-3-34-1804
and gnome-3-34-1804-sdk
. One is used when running the snap, so the executable finds its libraries, the other is used at build time to provide pkg-config
and CMake
related things.
You can look at how the gnome-3-34
sets things up for inspiration.
Lastly, you’ll want to request auto-connection for your platform snap, so people can use it without any manual steps needed after installing a consumer snap.
Here you can find the topical interface and a few examples: The content interface
It is quite analogous to the well-known libfoo
+ libfoo-dev
packaging scheme, only with snaps and with a little less granularity.