aboutsummaryrefslogtreecommitdiffstats
path: root/INSTALL.md
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2022-07-15 07:42:23 -0400
committerDavid Robillard <d@drobilla.net>2022-08-17 13:50:43 -0400
commit0579dca6a5fae625efbbfe3b31167d855c8f966d (patch)
treebcf69a28dfb65f941e9540986a693fd4c612eb50 /INSTALL.md
parente1bcda7bd5ed51bf60157605bb087d2312e15e59 (diff)
downloadjalv-0579dca6a5fae625efbbfe3b31167d855c8f966d.tar.gz
jalv-0579dca6a5fae625efbbfe3b31167d855c8f966d.tar.bz2
jalv-0579dca6a5fae625efbbfe3b31167d855c8f966d.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/