|
1 | 1 | libxml++
|
2 |
| -------------- |
| 2 | +-------- |
3 | 3 |
|
4 |
| -This library provides a C++ interface to XML files. It uses libxml2 to access |
5 |
| -the XML files, and in order to configure libxml++ you must have both libxml2 and |
6 |
| -pkg-config installed. |
| 4 | +libxml++ (a.k.a. libxmlplusplus) provides a C++ interface to XML files. It uses |
| 5 | +libxml2 to access the XML files, and in order to configure libxml++ you must |
| 6 | +have both libxml2 and pkg-config installed. |
7 | 7 |
|
8 | 8 | To get the latest version of libxml++, see
|
9 | 9 | http://libxmlplusplus.sourceforge.net/
|
10 | 10 | To contact the developers, send e-mail to the mailing list at
|
11 | 11 | http://mail.gnome.org/mailman/listinfo/libxmlplusplus-list
|
12 | 12 | We welcome patches, but it helps to discuss them first.
|
13 | 13 |
|
14 |
| -Read the file 'INSTALL' for instructions to compile and install the library. |
15 |
| - |
16 | 14 | See the examples directory for example code.
|
17 | 15 |
|
18 |
| -Use pkg-config to discover the necessary include and linker arguments. For |
19 |
| -instance, |
| 16 | +Use pkg-config to discover the necessary include and linker arguments. For instance, |
20 | 17 | pkg-config libxml++-5.0 --cflags --libs
|
21 |
| -Ideally you would use PKG_CHECK_MODULES in your configure.ac file. |
| 18 | +If you build with Autotools, ideally you would use PKG_CHECK_MODULES in your |
| 19 | +configure.ac file. |
| 20 | + |
| 21 | + |
| 22 | +# Building |
| 23 | + |
| 24 | +Whenever possible, you should use the official binary packages approved by the |
| 25 | +supplier of your operating system, such as your Linux distribution. |
| 26 | + |
| 27 | +## Building on Windows |
| 28 | + |
| 29 | +See MSVC_NMake/README |
| 30 | + |
| 31 | +## Building from a release tarball |
| 32 | + |
| 33 | +Extract the tarball and go to the extracted directory: |
| 34 | + $ tar xf libxml++-@LIBXMLXX_VERSION@.tar.xz |
| 35 | + $ cd libxml++-@LIBXMLXX_VERSION@ |
| 36 | + |
| 37 | +It's easiest to build with Meson, if the tarball was made with Meson, |
| 38 | +and to build with Autotools, if the tarball was made with Autotools. |
| 39 | +Then you don't have to use maintainer-mode. |
| 40 | + |
| 41 | +How do you know how the tarball was made? If it was made with Meson, |
| 42 | +it contains files in untracked/docs/ and other subdirectories |
| 43 | +of untracked/. |
| 44 | + |
| 45 | +### Building from a tarball with Meson |
| 46 | + |
| 47 | +Don't call the builddir 'build'. There is a directory called 'build' with |
| 48 | +files used by Autotools. |
| 49 | + |
| 50 | + $ meson --prefix /some_directory --libdir lib your_builddir . |
| 51 | + $ cd your_builddir |
| 52 | + |
| 53 | +If the tarball was made with Autotools, you must enable maintainer-mode: |
| 54 | + $ meson configure -Dmaintainer-mode=true |
| 55 | + |
| 56 | +Then, regardless of how the tarball was made: |
| 57 | + $ ninja |
| 58 | + $ ninja install |
| 59 | +You can run the tests like so: |
| 60 | + $ ninja test |
| 61 | + |
| 62 | +### Building from a tarball with Autotools |
| 63 | + |
| 64 | +If the tarball was made with Autotools: |
| 65 | + $ ./configure --prefix=/some_directory |
| 66 | +If the tarball was made with Meson, you must enable maintainer-mode: |
| 67 | + $ ./autogen.sh --prefix=/some_directory |
| 68 | + |
| 69 | +Then, regardless of how the tarball was made: |
| 70 | + $ make |
| 71 | + $ make install |
| 72 | +You can build the examples and tests, and run the tests, like so: |
| 73 | + $ make check |
| 74 | + |
| 75 | +## Building from git |
| 76 | + |
| 77 | +Building from git can be difficult so you should prefer building from |
| 78 | +a release tarball unless you need to work on the libxml++ code itself. |
| 79 | + |
| 80 | +jhbuild can be a good help |
| 81 | + https://gitlab.gnome.org/GNOME/jhbuild |
| 82 | + https://wiki.gnome.org/Projects/Jhbuild |
| 83 | + |
| 84 | +### Building from git with Meson |
| 85 | + |
| 86 | +Maintainer-mode is enabled by default when you build from a git clone. |
| 87 | + |
| 88 | +Don't call the builddir 'build'. There is a directory called 'build' with |
| 89 | +files used by Autotools. |
| 90 | + |
| 91 | + $ meson --prefix /some_directory --libdir lib your_builddir . |
| 92 | + $ cd your_builddir |
| 93 | + $ ninja |
| 94 | + $ ninja install |
| 95 | +You can run the tests like so: |
| 96 | + $ ninja test |
| 97 | +You can create a tarball like so: |
| 98 | + $ ninja dist |
| 99 | + |
| 100 | +### Building from git with Autotools |
| 101 | + |
| 102 | + $ ./autogen.sh --prefix=/some_directory |
| 103 | + $ make |
| 104 | + $ make install |
| 105 | +You can build the examples and tests, and run the tests, like so: |
| 106 | + $ make check |
| 107 | +You can create a tarball like so: |
| 108 | + $ make distcheck |
| 109 | +or |
| 110 | + $ make dist |
0 commit comments