You probably need to use pkg-config to find out which CFLAGS to use for glib-2.0...
Maybe I missed something but there is not much information about what you are trying to build. Starts with build system: autotools / cmake / meson / qmake / waf?
Is there a place to look into the recipe? That might make support easier.