From 9f33a2d09779636b89567981603f52f4a37d940a Mon Sep 17 00:00:00 2001 From: Ahmed Abdelfattah Date: Sun, 16 Apr 2023 13:21:35 +0200 Subject: [PATCH] README: add meson build steps * Add meson build instructions and reorder the README sections * Fix a small typo for the security section Signed-off-by: Ahmed Abdelfattah --- README | 62 +++++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 42 insertions(+), 20 deletions(-) diff --git a/README b/README index 183ee49a7..46eb19c6b 100644 --- a/README +++ b/README @@ -31,7 +31,7 @@ only by accident; so you should evaluate carefully whether D-Bus makes sense for your project. Security -== +=== If you find a security vulnerability that is not known to the public, please report it privately to dbus-security@lists.freedesktop.org @@ -84,19 +84,8 @@ Configuration === This branch of dbus can be built by using Autotools, CMake or Meson. -The Meson build system is currently considered experimental, but is -likely to become the recommended build system in future. - -Older versions of dbus required Autotools or CMake, with Autotools -recommended for Unix systems and CMake recommended for Windows systems. - -When using Autotools, the configure step is initiated by running ./configure -with or without additional configuration flags. dbus requires GNU Make -(on BSD systems, this is typically called gmake) or a "make" implementation -with compatible extensions. - -When using CMake, the configure step is initiated by running the cmake -program with or without additional configuration flags. +The Meson build system is the recommended build system for the master +(>1.15.x) branch. 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 @@ -116,12 +105,6 @@ install them, or try to remove the dependency with a Meson configuration option Configuration flags === -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. - When using Meson, to review the options which Meson chose, run: ``` sh @@ -136,6 +119,45 @@ the form `-D "option"="value"`. For example: meson configure build/ -Dprefix=/tmp/install ``` + +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 + + +Configuration and Building for Older Versions +=== + +Older versions of dbus required Autotools or CMake, with Autotools +recommended for Unix systems and CMake recommended for Windows systems. + +When using Autotools, the configure step is initiated by running ./configure +with or without additional configuration flags. dbus requires GNU Make +(on BSD systems, this is typically called gmake) or a "make" implementation +with compatible extensions. + +When using CMake, the configure step is initiated by running the cmake +program with or without additional configuration flags. + +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 instructions using cmake are described under README.cmake + API/ABI Policy === -- 2.47.3