root/CMake_modules/FindXSD.cmake @ 111

Revision 111, 1.2 kB (checked in by mido, 16 years ago)

pridana knihovna XSD (a jeji chlebodarkyne XERCES), v ramci Win32 zprovoznen priklad tests/test_xsd_hello.cxx

Line 
1#################
2# Locate Xsd from code synthesis include paths and binary
3# Xsd can be found at http://codesynthesis.com/products/xsd/
4# Slightly modified version of the module written by Frederic Heem, frederic.heem _at_ telsey.it
5
6# This module defines
7# XSD_INCLUDE_DIR, where to find elements.hxx, etc.
8# XSD_EXECUTABLE, where is the xsd compiler
9# XSD_FOUND, If false, don't try to use xsd
10
11FIND_PATH(XSD_INCLUDE_DIR xsd/cxx/parser/elements.hxx
12  "${XSD_DIR}\\libxsd"
13  /usr/local/include
14  /usr/include
15)
16
17FIND_PROGRAM(XSD_EXECUTABLE
18  NAMES
19    xsd
20  PATHS
21  "${XSD_DIR}\\bin"
22    /usr/local/bin
23    /usr/bin
24)
25
26# if the include and the program are found then we have it
27IF(XSD_INCLUDE_DIR AND XSD_EXECUTABLE)
28    SET( XSD_FOUND "YES" )
29ELSE(XSD_INCLUDE_DIR AND XSD_EXECUTABLE)
30  SET(XSD_FOUND "NO")
31ENDIF(XSD_INCLUDE_DIR AND XSD_EXECUTABLE)
32
33
34IF (XSD_FOUND)
35   IF (NOT XSD_FIND_QUIETLY)
36       MESSAGE(STATUS "Found XSD include directory: ${XSD_INCLUDE_DIR}")
37   ENDIF (NOT XSD_FIND_QUIETLY)
38ELSE (XSD_FOUND)
39   IF (XSD_FIND_REQUIRED)
40      MESSAGE(FATAL_ERROR "Could not find XSD include directory")
41   ENDIF (XSD_FIND_REQUIRED)
42ENDIF (XSD_FOUND)
43
44
45MARK_AS_ADVANCED(
46  XSD_INCLUDE_DIR
47  XSD_EXECUTABLE
48)
Note: See TracBrowser for help on using the browser.