Skip to content

Commit 1c83dcc

Browse files
committed
Update INSTALL.md for meson
1 parent 79693e0 commit 1c83dcc

File tree

2 files changed

+74
-59
lines changed

2 files changed

+74
-59
lines changed

INSTALL

-59
This file was deleted.

INSTALL.md

+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
Installation Instructions
2+
=========================
3+
4+
Prerequisites
5+
-------------
6+
7+
To build from source, you will need:
8+
9+
* A relatively modern C++ compiler (GCC, Clang, and MSVC are known to work).
10+
11+
* [Meson](http://mesonbuild.com/), which depends on
12+
[Python](http://python.org/).
13+
14+
This is a brief overview of building this project with meson. See the meson
15+
documentation for more detailed information.
16+
17+
Configuration
18+
-------------
19+
20+
The build is configured with the `setup` command, which creates a new build
21+
directory with the given name:
22+
23+
meson setup build
24+
25+
Some environment variables are read during `setup` and stored with the
26+
configuration:
27+
28+
* `CXX`: Path to C++ compiler.
29+
* `CXXFLAGS`: C++ compiler options.
30+
* `LDFLAGS`: Linker options.
31+
32+
However, it is better to use meson options for configuration. All options can
33+
be inspected with the `configure` command from within the build directory:
34+
35+
cd build
36+
meson configure
37+
38+
Options can be set by passing C-style "define" options to `configure`:
39+
40+
meson configure -Dcpp_args="-march=native" -Dprefix="/opt/mypackage/"
41+
42+
Note that some options, such as `strict` and `werror` are for
43+
developer/maintainer use only. Please don't file issues about anything that
44+
happens when they are enabled.
45+
46+
Building
47+
--------
48+
49+
From within a configured build directory, everything can be built with the
50+
`compile` command:
51+
52+
meson compile
53+
54+
Similarly, tests can be run with the `test` command:
55+
56+
meson test
57+
58+
Meson can also generate a project for several popular IDEs, see the `backend`
59+
option for details.
60+
61+
Installation
62+
------------
63+
64+
A compiled project can be installed with the `install` command:
65+
66+
meson install
67+
68+
You may need to acquire root permissions to install to a system-wide prefix.
69+
For packaging, the installation may be staged to a directory using the
70+
`DESTDIR` environment variable or the `--destdir` option:
71+
72+
DESTDIR=/tmp/mypackage/ meson install
73+
74+
meson install --destdir=/tmp/mypackage/

0 commit comments

Comments
 (0)