aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2019-05-22 12:16:31 -0700
committerJussi Pakkanen <jpakkane@gmail.com>2019-05-27 01:24:08 +0300
commit0714ba58c7e3683156a258649e723518c0e2ddc7 (patch)
treefe9de4f0b6e78511e92d9b9a018ff9aa7ac9cbe6 /docs
parent0d19d334a8b8e6ebbb1ebdaa5658790a01fdc466 (diff)
downloadmeson-0714ba58c7e3683156a258649e723518c0e2ddc7.zip
meson-0714ba58c7e3683156a258649e723518c0e2ddc7.tar.gz
meson-0714ba58c7e3683156a258649e723518c0e2ddc7.tar.bz2
coredata: add cmake_prefix_path option
Diffstat (limited to 'docs')
-rw-r--r--docs/markdown/Builtin-options.md1
-rw-r--r--docs/markdown/snippets/cmake-prefix-path.md16
2 files changed, 17 insertions, 0 deletions
diff --git a/docs/markdown/Builtin-options.md b/docs/markdown/Builtin-options.md
index 1d6f9f9..9c87aef 100644
--- a/docs/markdown/Builtin-options.md
+++ b/docs/markdown/Builtin-options.md
@@ -70,6 +70,7 @@ They have no effect when the host and build machines are the same.
| layout {mirror,flat} | mirror | Build directory layout | no |
| optimization {0, g, 1, 2, 3, s} | 0 | Optimization level | no |
| pkg_config_path | [] | Additional paths for pkg-config to search before builtin paths | yes |
+| cmake_prefix_path | [] | Additional prefixes for cmake to search before builtin paths | yes |
| stdsplit | true | Split stdout and stderr in test logs | no |
| strip | false | Strip targets on install | no |
| unity {on, off, subprojects} | off | Unity build | no |
diff --git a/docs/markdown/snippets/cmake-prefix-path.md b/docs/markdown/snippets/cmake-prefix-path.md
new file mode 100644
index 0000000..15497b8
--- /dev/null
+++ b/docs/markdown/snippets/cmake-prefix-path.md
@@ -0,0 +1,16 @@
+## CMake prefix path overrides
+
+When using pkg-config as a dependency resolver we can pass
+`-Dpkg_config_path=$somepath` to extend or overwrite where pkg-config will
+search for dependencies. Now cmake can do the same, as long as the dependency
+uses a ${Name}Config.cmake file (not a Find{$Name}.cmake file), by passing
+`-Dcmake_prefix_path=list,of,paths`. It is important that point this at the
+prefix that the dependency is installed into, not the cmake path.
+
+If you have installed something to `/tmp/dep`, which has a layout like:
+```
+/tmp/dep/lib/cmake
+/tmp/dep/bin
+```
+
+then invoke meson as `meson builddir/ -Dcmake_prefix_path=/tmp/dep`