project {
  // Support alternate versions of glib:
  expand(GLIB_VERSION) {
    $GLIB_VERSION
    2.0
  }

  expand(GLIB_LIB_DIR) {
    $GLIB_LIB_DIR
    lib
  }

  libpaths      += $(GLIB_ROOT)/lib

  lit_libs      += glib-$(GLIB_VERSION)
}

feature(glib_versioned_includes) {
  includes += $(GLIB_ROOT)/include/glib-$(GLIB_VERSION) \
              $(GLIB_ROOT)/$(GLIB_LIB_DIR)/glib-$(GLIB_VERSION)/include
}

feature(!glib_versioned_includes) {
  includes += $(GLIB_ROOT)/include
  libpaths -= $(GLIB_ROOT)/lib
  specific {
    Debug::libpaths += $(GLIB_ROOT)/debug/lib
    Release::libpaths += $(GLIB_ROOT)/lib
  }
}
