2 # The following setings are defined
3 # XERCESC_ROOT_DIR, the root of the include and lib directory
4 # XERCESC_INCLUDE_DIR, the full path of the include dir (ADVANCED)
5 # XERCESC_LIBRARIES, the name of the xerces-c library (ADVANCED)
7 # Look for a root installation
9 SET( XERCES_WINDIR C:/Programs/xerces-vc )
11 SET( XERCES_WINDIR C:/Programs/xerces )
14 FIND_PATH(XERCESC_ROOT_DIR include/xercesc/parsers/SAXParser.hpp
16 "C:/mingw/msys/1.0/local"
17 "C:/Program Files/CodeSynthesis XSD 3.2"
22 DOC "The root of an installed xerces-c installation"
25 # try to find the header
26 FIND_PATH(XERCESC_INCLUDE_DIR xercesc/parsers/SAXParser.hpp
27 ${XERCESC_ROOT_DIR}/include
33 FIND_LIBRARY(XERCESC_LIBRARY
34 NAMES xerces-c xerces-c_3
36 ${XERCESC_ROOT_DIR}/lib
37 ${XERCESC_ROOT_DIR}/lib/vc-9.0
38 ${XERCESC_ROOT_DIR}/lib64/vc-9.0
41 DOC "The name of the xerces-c library"
45 IF (XERCESC_INCLUDE_DIR AND XERCESC_LIBRARY)
46 SET (XERCESC_FOUND TRUE)
47 SET (XERCESC_LIBRARIES "${XERCESC_LIBRARY}")
48 # FIXME: There should be a better way of handling this?
49 # FIXME: How can we test to see if the lib dir isn't
50 # FIXME: one of the default dirs?
51 LINK_DIRECTORIES(${XERCESC_ROOT_DIR}/lib)
52 ENDIF (XERCESC_INCLUDE_DIR AND XERCESC_LIBRARY)
53 ENDIF (XERCESC_ROOT_DIR)
56 IF (NOT XERCESC_FIND_QUIETLY)
57 MESSAGE (STATUS " found xerces-c: ${XERCESC_LIBRARY}")
58 ENDIF (NOT XERCESC_FIND_QUIETLY)
60 IF (XERCESC_FIND_REQUIRED)
61 MESSAGE(FATAL_ERROR "Could not find Xerces-C")
62 ENDIF (XERCESC_FIND_REQUIRED)