summaryrefslogtreecommitdiff
path: root/xsd-examples/cxx/tree/embedded/buildfile
blob: 583e34e9fabcb3e78540d22e5a31ad5c927ebe73 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# file      : cxx/tree/embedded/buildfile
# license   : not copyrighted - public domain

import libxsd    = libxsd%lib{xsd}
import libxerces = libxerces-c%lib{xerces-c}

./: exe{driver} exe{xsdbin} doc{README}

# exe{driver}
#
exe{driver}: {hxx     cxx}{* -xsdbin -library -library-schema} \
             {hxx ixx cxx}{library}                            \
             {hxx     cxx}{library-schema}                     \
             $libxsd $libxerces

exe{driver}: xml{library}: test.input = true

<{hxx ixx cxx}{library}>: xsd{library} $xsd
{{
  $xsd cxx-tree --std c++11   \
       --generate-inline      \
       --output-dir $out_base \
       $path($<[0])
}}

<{hxx cxx}{library-schema}>: xsd{library} exe{xsdbin}
{{
  diag xsdbin ($<[0]) -> $>

  ($<[1]) --output-dir $out_base $path($<[0])
}}

# exe{xsdbin}
#
exe{xsdbin}: cxx{xsdbin} $libxerces
exe{xsdbin}: test = false

# Build options.
#
cxx.poptions =+ "-I$out_base" "-I$src_base"

# Define XSD_CXX11 since we include libxsd headers directly.
#
cxx.poptions += -DXSD_CXX11