aboutsummaryrefslogtreecommitdiff
path: root/docs/markdown/howtox.md
diff options
context:
space:
mode:
authorDaniel Mensinger <daniel@mensinger-ka.de>2019-01-31 23:25:21 +0100
committerJussi Pakkanen <jpakkane@gmail.com>2019-02-01 00:25:21 +0200
commite1a83793ae986db44bc810c36a8ea8090d81fe3f (patch)
tree56706c7f19a38b36f609f5ba6fa318f60c7acc1d /docs/markdown/howtox.md
parentabad2ff0056f1100425426094165691386477d11 (diff)
downloadmeson-e1a83793ae986db44bc810c36a8ea8090d81fe3f.zip
meson-e1a83793ae986db44bc810c36a8ea8090d81fe3f.tar.gz
meson-e1a83793ae986db44bc810c36a8ea8090d81fe3f.tar.bz2
CMake: Added support for CMAKE_MODULE_PATH and extra CMake args (closes #4779)
Diffstat (limited to 'docs/markdown/howtox.md')
-rw-r--r--docs/markdown/howtox.md17
1 files changed, 17 insertions, 0 deletions
diff --git a/docs/markdown/howtox.md b/docs/markdown/howtox.md
index 3d8515f..8ae4fde 100644
--- a/docs/markdown/howtox.md
+++ b/docs/markdown/howtox.md
@@ -203,3 +203,20 @@ executable(..., dependencies : m_dep)
```meson
executable(..., install : true, install_dir : get_option('libexecdir'))
```
+
+## Use existing `Find<name>.cmake` files
+
+Meson can use the CMake `find_package()` ecosystem if CMake is installed.
+To find a dependency with custom `Find<name>.cmake`, set the `cmake_module_path`
+property to the path in your project where the CMake scripts are stored.
+
+Example for a `FindCmakeOnlyDep.cmake` in a `cmake` subdirectory:
+
+```meson
+cm_dep = dependency('CmakeOnlyDep', cmake_module_path : 'cmake')
+```
+
+The `cmake_module_path` property is only needed for custom CMake scripts. System
+wide CMake scripts are found automatically.
+
+More information can be found [here](Dependencies.md#cmake)