1
- libxml++
2
- --------
3
-
1
+ # libxml++
4
2
libxml++ (a.k.a. libxmlplusplus) provides a C++ interface to XML files. It uses
5
3
libxml2 to access the XML files, and in order to configure libxml++ you must
6
4
have both libxml2 and pkg-config installed.
7
5
8
- To get the latest version of libxml++, see
9
- https://libxmlplusplus.github.io/libxmlplusplus/
10
- To contact the developers, send e-mail to the mailing list at
11
- http://mail.gnome.org/mailman/listinfo/libxmlplusplus-list
12
- We welcome patches, but it helps to discuss them first.
6
+ To get the latest version of libxml++, see the
7
+ [ libxml++ web site ] ( https://libxmlplusplus.github.io/libxmlplusplus/ )
8
+
9
+ To contact the developers, send e-mail to the
10
+ [ libxml++ mailing list ] ( https://mail.gnome.org/mailman/listinfo/libxmlplusplus-list )
13
11
14
12
See the examples directory for example code.
15
13
16
14
Use pkg-config to discover the necessary include and linker arguments. For instance,
15
+ ```
17
16
pkg-config libxml++-4.0 --cflags --libs
17
+ ```
18
18
If you build with Autotools, ideally you would use PKG_CHECK_MODULES in your
19
19
configure.ac file.
20
20
21
-
22
21
# Building
23
22
24
23
Whenever possible, you should use the official binary packages approved by the
@@ -31,8 +30,10 @@ See MSVC_NMake/README
31
30
## Building from a release tarball
32
31
33
32
Extract the tarball and go to the extracted directory:
33
+ ```
34
34
$ tar xf libxml++-@LIBXMLXX_VERSION@.tar.xz
35
35
$ cd libxml++-@LIBXMLXX_VERSION@
36
+ ```
36
37
37
38
It's easiest to build with Meson, if the tarball was made with Meson,
38
39
and to build with Autotools, if the tarball was made with Autotools.
@@ -46,65 +47,90 @@ of untracked/.
46
47
47
48
Don't call the builddir 'build'. There is a directory called 'build' with
48
49
files used by Autotools.
49
-
50
+ ```
50
51
$ meson --prefix /some_directory --libdir lib your_builddir .
51
52
$ cd your_builddir
52
-
53
+ ```
53
54
If the tarball was made with Autotools, you must enable maintainer-mode:
55
+ ```
54
56
$ meson configure -Dmaintainer-mode=true
55
-
57
+ ```
56
58
Then, regardless of how the tarball was made:
59
+ ```
57
60
$ ninja
58
61
$ ninja install
62
+ ```
59
63
You can run the tests like so:
64
+ ```
60
65
$ ninja test
66
+ ```
61
67
62
68
### Building from a tarball with Autotools
63
69
64
70
If the tarball was made with Autotools:
71
+ ```
65
72
$ ./configure --prefix=/some_directory
73
+ ```
66
74
If the tarball was made with Meson, you must enable maintainer-mode:
75
+ ```
67
76
$ ./autogen.sh --prefix=/some_directory
68
-
77
+ ```
69
78
Then, regardless of how the tarball was made:
79
+ ```
70
80
$ make
71
81
$ make install
82
+ ```
72
83
You can build the examples and tests, and run the tests, like so:
84
+ ```
73
85
$ make check
86
+ ```
74
87
75
88
## Building from git
76
89
77
90
Building from git can be difficult so you should prefer building from
78
91
a release tarball unless you need to work on the libxml++ code itself.
79
92
80
93
jhbuild can be a good help
81
- https://gitlab.gnome.org/GNOME/jhbuild
82
- https://wiki.gnome.org/Projects/Jhbuild
94
+ - https://gitlab.gnome.org/GNOME/jhbuild
95
+ - https://wiki.gnome.org/Projects/Jhbuild
96
+ - https://gnome.pages.gitlab.gnome.org/jhbuild
83
97
84
98
### Building from git with Meson
85
99
86
100
Maintainer-mode is enabled by default when you build from a git clone.
87
101
88
102
Don't call the builddir 'build'. There is a directory called 'build' with
89
103
files used by Autotools.
90
-
104
+ ```
91
105
$ meson --prefix /some_directory --libdir lib your_builddir .
92
106
$ cd your_builddir
93
107
$ ninja
94
108
$ ninja install
109
+ ```
95
110
You can run the tests like so:
111
+ ```
96
112
$ ninja test
113
+ ```
97
114
You can create a tarball like so:
115
+ ```
98
116
$ ninja dist
117
+ ```
99
118
100
119
### Building from git with Autotools
101
-
120
+ ```
102
121
$ ./autogen.sh --prefix=/some_directory
103
122
$ make
104
123
$ make install
124
+ ```
105
125
You can build the examples and tests, and run the tests, like so:
126
+ ```
106
127
$ make check
128
+ ```
107
129
You can create a tarball like so:
130
+ ```
108
131
$ make distcheck
132
+ ```
109
133
or
134
+ ```
110
135
$ make dist
136
+ ```
0 commit comments