mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-05-24 12:28:13 +02:00
Now that we are recommending Meson, let's de-emphasize Autotools. Anyone who still needs Autotools will already know how it works, at least generically. Signed-off-by: Simon McVittie <smcv@collabora.com>
100 lines
2.5 KiB
Text
100 lines
2.5 KiB
Text
DBus Installation
|
|
=================
|
|
|
|
Quick start
|
|
===========
|
|
|
|
This branch of dbus can be built by using Meson, GNU Autotools or CMake.
|
|
The Meson build system is the recommended build system for the master
|
|
branch (versions >= 1.15.0).
|
|
|
|
Meson only supports out-of-tree builds, and must be passed a directory to put
|
|
built and generated sources into. We'll call that directory "build" here. It's
|
|
recommended to create a separate build directory for each configuration you
|
|
might want to use.
|
|
|
|
Basic configuration is done with:
|
|
|
|
``` sh
|
|
meson build/
|
|
```
|
|
|
|
This will create the build directory. If any dependencies are missing, you can
|
|
install them, or try to remove the dependency with a Meson configuration option
|
|
(see below).
|
|
|
|
Older versions of dbus required Autotools or CMake, with Autotools
|
|
recommended for Unix systems and CMake recommended for Windows systems.
|
|
|
|
Configuration flags
|
|
===================
|
|
|
|
When using Meson, to review the options which Meson chose, run:
|
|
|
|
``` sh
|
|
meson configure build/
|
|
```
|
|
|
|
With additional arguments meson configure can be used to change options for a
|
|
previously configured build directory. All options passed to this command are in
|
|
the form `-D "option"="value"`. For example:
|
|
|
|
``` sh
|
|
meson configure build/ -Dprefix=/tmp/install
|
|
```
|
|
|
|
See `meson_options.txt` for details of dbus-specific options, and
|
|
<https://mesonbuild.com/Builtin-options.html> for details of generic
|
|
Meson options.
|
|
|
|
When using Autotools, run "./configure --help" to see the possible
|
|
configuration options and environment variables.
|
|
|
|
When using CMake, inspect README.cmake to see the possible
|
|
configuration options and environment variables.
|
|
|
|
Building
|
|
========
|
|
|
|
To build with meson, here is a quick guide:
|
|
|
|
``` sh
|
|
cd dbus
|
|
meson setup build/ && cd build/
|
|
meson compile
|
|
meson test
|
|
```
|
|
|
|
Full build instructions can be found on mesonbuild website:
|
|
https://mesonbuild.com/Running-Meson.html
|
|
|
|
The CMake equivalent is:
|
|
|
|
mkdir dbus-build-dir
|
|
cd dbus-build-dir
|
|
cmake -G <makefile-generator-name> [-D<option>] <dbus-src-root>/cmake
|
|
make
|
|
make install
|
|
|
|
See README.cmake for more details.
|
|
|
|
External software dependancies
|
|
==============================
|
|
|
|
The only fundamental requirement to build DBus is an XML parser,
|
|
however, there are a number of other software packages which (if
|
|
present) will enhance functionality.
|
|
|
|
Core library
|
|
------------
|
|
|
|
Requisite:
|
|
|
|
- Gettext
|
|
- expat
|
|
|
|
Optional:
|
|
|
|
- libselinux (for SELinux integration)
|
|
- doxygen (for API documentation)
|
|
- xmlto or meinproc4 (for Spec & other XML documentation)
|