aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorJon Turney <jon.turney@dronecode.org.uk>2018-06-05 22:58:28 +0100
committerNirbheek Chauhan <nirbheek.chauhan@gmail.com>2018-06-10 01:47:51 +0000
commit2e29f37b0ed004c73f9786117f625fae9146b194 (patch)
tree1c5eb9ae1e57b4f761c3bda3a723143ae2ffc925 /docs
parentc2cb2f5c1c73b64e3176abbe19f8de59458f81e6 (diff)
downloadmeson-2e29f37b0ed004c73f9786117f625fae9146b194.zip
meson-2e29f37b0ed004c73f9786117f625fae9146b194.tar.gz
meson-2e29f37b0ed004c73f9786117f625fae9146b194.tar.bz2
Document values for dependency(method:) [skip ci]
We say 'different dependencies support different values for this', but nowhere document what values are supported, so the only way to find these out is to read the source, or guess. Make a start at doing that.
Diffstat (limited to 'docs')
-rw-r--r--docs/markdown/Dependencies.md45
-rw-r--r--docs/markdown/Reference-manual.md5
2 files changed, 37 insertions, 13 deletions
diff --git a/docs/markdown/Dependencies.md b/docs/markdown/Dependencies.md
index 8e8ce2f..a811784 100644
--- a/docs/markdown/Dependencies.md
+++ b/docs/markdown/Dependencies.md
@@ -111,24 +111,31 @@ of all the work behind the scenes to make this work.
# Dependencies with custom lookup functionality
-## Dependencies using config tools
+Some dependencies have specific detection logic.
+
+In some cases, more than one detection method exists, and the `method` keyword
+may be used to select a detection method to use. The `auto` method uses any
+checking mechanisms in whatever order meson thinks is best.
-CUPS, [LLVM](#llvm), PCAP, [WxWidgets](#wxwidgets), libwmf, and GnuStep either do not
-provide pkg-config modules or additionally can be detected via a config tool
-(cups-config, llvm-config, etc). Meson has native support for these tools, and
-they can be found like other dependencies:
+e.g. libwmf and CUPS provide both pkg-config and config-tool support. You can
+force one or another via the `method` keyword:
```meson
-pcap_dep = dependency('pcap', version : '>=1.0')
-cups_dep = dependency('cups', version : '>=1.4')
-llvm_dep = dependency('llvm', version : '>=4.0')
+cups_dep = dependency('cups', method : 'pkg-config')
+wmf_dep = dependency('libwmf', method : 'config-tool')
```
-Some of these tools (like wmf and cups) provide both pkg-config and config
-tools support. You can force one or another via the method keyword:
+## Dependencies using config tools
+
+[CUPS](#cups), [LLVM](#llvm), PCAP, [WxWidgets](#wxwidgets), libwmf, and GnuStep
+either do not provide pkg-config modules or additionally can be detected via a
+config tool (cups-config, llvm-config, etc). Meson has native support for these
+tools, and they can be found like other dependencies:
```meson
-wmf_dep = dependency('libwmf', method : 'config-tool')
+pcap_dep = dependency('pcap', version : '>=1.0')
+cups_dep = dependency('cups', version : '>=1.4')
+llvm_dep = dependency('llvm', version : '>=4.0')
```
## AppleFrameworks
@@ -139,6 +146,8 @@ Use the `modules` keyword to list frameworks required, e.g.
dep = find_dep('appleframeworks', modules : 'foundation')
```
+These dependencies can never be found for non-OSX hosts.
+
## Boost
Boost is not a single dependency but rather a group of different
@@ -168,10 +177,16 @@ environment variables.
You can set the argument `threading` to `single` to use boost libraries that
have been compiled for single-threaded use instead.
+## CUPS
+
+`method` may be `auto`, `config-tool`, `pkg-config` or `extraframework`.
+
## GL
This finds the OpenGL library in a way appropriate to the platform.
+`method` may be `auto`, `pkg-config` or `system`.
+
## GTest and GMock
GTest and GMock come as sources that must be compiled as part of your
@@ -252,6 +267,8 @@ Note that `python3` found by this dependency might differ from the one used in
`python3` module because modules uses the current interpreter, but dependency tries
`pkg-config` first.
+`method` may be `auto`, `extraframework`, `pkg-config` or `sysconfig`
+
## Qt4 & Qt5
Meson has native Qt support. Its usage is best demonstrated with an
@@ -291,11 +308,15 @@ include path of the given module(s) to the compiler flags. (since v0.47.0)
**Note** using private headers in your project is a bad idea, do so at your own
risk.
+`method` may be `auto`, `pkgconfig` or `qmake`.
+
## SDL2
SDL2 can be located using `pkg-confg`, the `sdl2-config` config tool, or as an
OSX framework.
+`method` may be `auto`, `config-tool`, `extraframework` or `pkg-config`.
+
## Threads
This dependency selects the appropriate compiler flags and/or libraries to use
@@ -312,6 +333,8 @@ and avoids trying to link with it's non-PIC static libs.
Vulkan can be located using `pkg-config`, or the `VULKAN_SDK` environment variable.
+`method` may be `auto`, `pkg-config` or `system`.
+
## WxWidgets
Similar to [Boost](#boost), WxWidgets is not a single library but rather
diff --git a/docs/markdown/Reference-manual.md b/docs/markdown/Reference-manual.md
index 4d48c5f..26d91c5 100644
--- a/docs/markdown/Reference-manual.md
+++ b/docs/markdown/Reference-manual.md
@@ -346,8 +346,9 @@ otherwise. This function supports the following keyword arguments:
dependency to find if it's available for multiple languages.
- `method` defines the way the dependency is detected, the default is
`auto` but can be overridden to be e.g. `qmake` for Qt development,
- and different dependencies support different values for this (though
- `auto` will work on all of them)
+ and [different dependencies support different values]
+ (Dependencies.md#dependencies-with-custom-lookup-functionality)
+ for this (though `auto` will work on all of them)
- `native` if set to `true`, causes Meson to find the dependency on
the build machine system rather than the host system (i.e. where the
cross compiled binary will run on), usually only needed if you build