+#-----------------------------------------------------------
+
+IF(USE_XERCES)
+
+ # FIND xerces
+ IF(WIN32)
+
+ SET(XERCES_LIB_DIR $ENV{XERCES_DIR})
+
+ IF(NOT XERCES_LIB_DIR)
+ MESSAGE(FATAL_ERROR "XERCES_DIR not found")
+ ELSE(NOT XERCES_LIB_DIR)
+
+ INCLUDE_DIRECTORIES( ${XERCES_LIB_DIR}/include )
+ LINK_DIRECTORIES( ${XERCES_LIB_DIR}/lib )
+
+ ENDIF(NOT XERCES_LIB_DIR)
+
+ IF(USE_DEBUG_LIB)
+ set(XERCES_LIBRARIES xerces-c_3D)
+ ELSE(USE_DEBUG_LIB)
+ set(XERCES_LIBRARIES xerces-c_3)
+ ENDIF(USE_DEBUG_LIB)
+
+ MARK_AS_ADVANCED(XERCES_LIB_DIR)
+ ENDIF(WIN32)
+
+
+ IF(UNIX)
+ IF(APPLE)
+ SET(XERCES_LIBRARIES xerces-c )
+ INCLUDE_DIRECTORIES( /opt/local/include )
+ LINK_DIRECTORIES( /opt/local/lib )
+#JCP 10/01/11
+ ELSE(NOT APPLE)
+ SET(XERCES_LIBRARIES xerces-c )
+ INCLUDE_DIRECTORIES( /usr/local/include )
+ LINK_DIRECTORIES( /usr/local/lib /usr/lib)
+ #FIND_PACKAGE(Xerces)
+ # Use if found
+ #IF(Xerces_FOUND)
+ # INCLUDE_DIRECTORIES( ${XERCES_INCLUDE_DIR} )
+ #ENDIF(Xerces_FOUND)
+ ENDIF(APPLE)
+ ENDIF(UNIX)
+
+ENDIF(USE_XERCES)