summaryrefslogtreecommitdiffstats
path: root/INSTALL.md
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2022-07-17 17:33:37 -0400
committerDavid Robillard <d@drobilla.net>2022-07-18 20:10:45 -0400
commite2731cf7008b2f1f9e1f44283b07c3fe0296bbee (patch)
tree7e24b7005920af4d0e969000dc80e3fdffe3eb41 /INSTALL.md
parent1cda90c39e4b2c55c775cd6bd6dcb08aee4d640d (diff)
downloadsord-e2731cf7008b2f1f9e1f44283b07c3fe0296bbee.tar.gz
sord-e2731cf7008b2f1f9e1f44283b07c3fe0296bbee.tar.bz2
sord-e2731cf7008b2f1f9e1f44283b07c3fe0296bbee.zip
Switch to meson build system
Diffstat (limited to 'INSTALL.md')
-rw-r--r--INSTALL.md70
1 files changed, 70 insertions, 0 deletions
diff --git a/INSTALL.md b/INSTALL.md
new file mode 100644
index 0000000..7109c35
--- /dev/null
+++ b/INSTALL.md
@@ -0,0 +1,70 @@
+Installation Instructions
+=========================
+
+Prerequisites
+-------------
+
+To build from source, you will need:
+
+ * A relatively modern C compiler (GCC, Clang, and MSVC are known to work).
+
+ * [Meson](http://mesonbuild.com/), which depends on
+ [Python](http://python.org/).
+
+This is a brief overview of building this project with meson. See the meson
+documentation for more detailed information.
+
+Configuration
+-------------
+
+The build is configured with the `setup` command, which creates a new build
+directory with the given name:
+
+ meson setup build
+
+Some environment variables are read during `setup` and stored with the
+configuration:
+
+ * `CC`: Path to C compiler.
+ * `CFLAGS`: C compiler options.
+ * `LDFLAGS`: Linker options.
+
+However, it is better to use meson options for configuration. All options can
+be inspected with the `configure` command from within the build directory:
+
+ cd build
+ meson configure
+
+Options can be set by passing C-style "define" options to `configure`:
+
+ meson configure -Dc_args="-march=native" -Dprefix="/opt/mypackage/"
+
+Building
+--------
+
+From within a configured build directory, everything can be built with the
+`compile` command:
+
+ meson compile
+
+Similarly, tests can be run with the `test` command:
+
+ meson test
+
+Meson can also generate a project for several popular IDEs, see the `backend`
+option for details.
+
+Installation
+------------
+
+A compiled project can be installed with the `install` command:
+
+ meson install
+
+You may need to acquire root permissions to install to a system-wide prefix.
+For packaging, the installation may be staged to a directory using the
+`DESTDIR` environment variable or the `--destdir` option:
+
+ DESTDIR=/tmp/mypackage/ meson install
+
+ meson install --destdir=/tmp/mypackage/