aboutsummaryrefslogtreecommitdiff
path: root/docs/markdown/Dependencies.md
diff options
context:
space:
mode:
authorFFY00 <filipe.lains@gmail.com>2018-07-17 23:46:13 +0100
committerFFY00 <filipe.lains@gmail.com>2018-07-17 23:46:13 +0100
commit0173b2457d9840ae63fff96aa30f387570e985cf (patch)
tree58bde2e60da8d55f1e33dcd509e17b4d5f10b0b6 /docs/markdown/Dependencies.md
parente39b6be67098778ba578bf65da6e1ecc855c025d (diff)
downloadmeson-0173b2457d9840ae63fff96aa30f387570e985cf.zip
meson-0173b2457d9840ae63fff96aa30f387570e985cf.tar.gz
meson-0173b2457d9840ae63fff96aa30f387570e985cf.tar.bz2
docs: fix dlang module documentation
Diffstat (limited to 'docs/markdown/Dependencies.md')
-rw-r--r--docs/markdown/Dependencies.md52
1 files changed, 33 insertions, 19 deletions
diff --git a/docs/markdown/Dependencies.md b/docs/markdown/Dependencies.md
index 20e356f..7b4262d 100644
--- a/docs/markdown/Dependencies.md
+++ b/docs/markdown/Dependencies.md
@@ -109,6 +109,38 @@ object. Since they can be used interchangeably, the rest of the build
definitions do not need to care which one it is. Meson will take care
of all the work behind the scenes to make this work.
+# Dependency method
+
+You can use the keyword `method` to let meson know what method to use
+when searching for the dependency. The default value is `auto`.
+Aditional dependencies methods are `pkg-config`, `config-tool`,
+`system`, `sysconfig`, `qmake`, `extraframework` and `dub`.
+
+```meson
+cups_dep = dependency('cups', method : 'pkg-config')
+```
+
+### Some notes on Dub
+
+Please understand that meson is only able to find dependencies that
+exist in the local Dub repository. You need to manually fetch and
+build the target dependencies.
+
+For `urld`.
+```
+dub fetch urld
+dub build urld
+```
+
+Other thing you need to keep in mind is that both meson and Dub need
+to be using the same compiler. This can be achieved using Dub's
+`-compiler` argument and/or manually setting the `DC` environment
+variable when running meson.
+```
+dub build urld --compiler=dmd
+DC="dmd" meson builddir
+```
+
# Dependencies with custom lookup functionality
Some dependencies have specific detection logic.
@@ -186,24 +218,6 @@ have been compiled for single-threaded use instead.
`method` may be `auto`, `config-tool`, `pkg-config` or `extraframework`.
-## Dub
-
-Use `method` to find dependencies with Dub. Just create a dependency as you would normally, but add `dub` as the dependency method.
-```meson
-urld_dep = dependency('urld', method: 'dub')
-```
-
-Please understand that meson is only able to find existing dependencies. You still need to manually fetch and build them with Dub.
-```
-dub fetch urld
-dub build urld
-```
-Other thing you need to keep in mind is that both meson and Dub need to be using the same compiler. This can be achieved using Dub's `-compiler` argument and/or manually setting the `DC` environment variable when running meson.
-```
-dub build urld --compiler=dmd
-DC="dmd" meson builddir
-```
-
## GL
This finds the OpenGL library in a way appropriate to the platform.
@@ -298,7 +312,7 @@ The `language` keyword may used.
Python3 is handled specially by meson:
1. Meson tries to use `pkg-config`.
-1. If `pkg-config` fails meson uses a fallback:
+2. If `pkg-config` fails meson uses a fallback:
- On Windows the fallback is the current `python3` interpreter.
- On OSX the fallback is a framework dependency from `/Library/Frameworks`.