From 9d026fa8a90fe6031c5a2abe7e92f92d46430939 Mon Sep 17 00:00:00 2001 From: Kjell Ahlstedt Date: Mon, 13 Jan 2020 15:07:16 +0100 Subject: README.md, README_build: Describe building with Meson --- README.md | 32 ++++++++++++++++++++++++++++++-- README_build | 18 +++++++++++++++++- 2 files changed, 47 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 0f220db..0705770 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,18 @@ packages. Building from the [libsigc++ release tarball](https://github.com/libsigcplusplus/libsigcplusplus/releases) is easier than building from git. +### Building from a tarball with Meson + +For instance: +```sh +$ meson --prefix /usr/local --libdir lib yourbuilddir . +$ cd yourbuilddir +$ ninja +$ ninja install +``` + +### Building from a tarball with autotools + For instance: ```sh $ ./configure --prefix=/usr/local @@ -45,8 +57,21 @@ $ make install Building from git can be difficult so you should prefer building from a release tarball unless you need to work on the libsigc++ code itself. -To build from git you may use either the autotools build (used by most -developers) or CMake (should work too). +To build from git you may use either the meson build (added in December 2019), +the autotools build (used by most developers in the past) or CMake (should work too). + +### Building from git with Meson + +You must have meson properly installed (meson, ninja, etc) and you +will also need [mm-common](https://gitlab.gnome.org/GNOME/mm-common/) +version 1.0.0 or higher. + +```sh +$ meson --prefix /usr/local --libdir lib yourbuilddir . +$ cd yourbuilddir +$ ninja +$ ninja test +``` ### Building from git with autotools @@ -73,3 +98,6 @@ $ cmake path/to/libsigcplusplus $ make ``` +## Building with Microsoft Visual C++ + +See MSVC_NMake/README.txt. diff --git a/README_build b/README_build index 0af40be..38f3681 100644 --- a/README_build +++ b/README_build @@ -3,9 +3,25 @@ On Linux, you would ideally get libsigc++ from your distro's official package. However, this is about building from source. +## Meson + +libsigc++ uses Meson as one of its main build systems, +so you can build or install with the regular meson/ninja steps. +For instance: + meson --prefix /opt/something --libdir lib yourbuilddir . +then + cd yourbuilddir + ninja + ninja install +You can run the tests like so: + ninja test +We create the tarball release like so: + ninja dist + + ## autotools -libsigc++ uses autotools as its main build system, +libsigc++ uses autotools as one of its main build systems, so you can build or install with the regular configure/make steps. For instance: ./configure --prefix=/opt/something -- cgit v1.2.1