// -*- MPC -*-
feature(!xerces2, !xerces3) {
  requires += xerces
}

feature(xerces2) {
  includes += $(XERCESCROOT)/include
  libpaths += $(XERCESCROOT)/lib

  specific(prop:microsoft) {
    xerceslib = xerces-c_2

    // Linking the optimized version of xerces-c_2 into a debug application
    // has been known to cause run-time issues (as of 4/25/2005), so we
    // will link in the debug version for the "Debug" configuration.
    Debug::xerceslib = xerces-c_2D
  }
  specific(prop:borland) {
    xerceslib = XercesLib
  }
  specific(!prop:windows) {
    macros   += XML_USE_PTHREADS
    xerceslib = xerces-c
  }

  // We have to use lit_libs here as the library decorator
  // does not necessarily match what MPC uses (particularly for
  // static builds).
  lit_libs += $(XERCESLIB)
}
feature(xerces3) {
  expand(XERCESC_INCDIR) {
    $XERCESC_INCDIR
    $(XERCESCROOT)/include
  }
  expand(XERCESC_LIBDIR) {
    $XERCESC_LIBDIR
    $(XERCESCROOT)/lib
  }

  includes += $(XERCESC_INCDIR)
  libpaths += $(XERCESC_LIBDIR)

  specific(prop:microsoft) {
    xerceslib = xerces-c_3

    // Linking the optimized version of xerces-c_2 into a debug application
    // has been known to cause run-time issues (as of 4/25/2005), so we
    // will link in the debug version for the "Debug" configuration.
    Debug::xerceslib = xerces-c_3D
  }
  specific(prop:borland) {
    xerceslib = XercesLib
  }
  specific(!prop:windows) {
    macros   += XML_USE_PTHREADS
    xerceslib = xerces-c
  }

  // We have to use lit_libs here as the library decorator
  // does not necessarily match what MPC uses (particularly for
  // static builds).
  lit_libs += $(XERCESLIB)
}

