docs: correctly classify module methods as a method, not a function

pull/10535/head
Eli Schwartz 2 years ago
parent 8ef3909086
commit 21493fe5c6
No known key found for this signature in database
GPG Key ID: CEB167EFB5722BD6
  1. 14
      docs/markdown/CMake-module.md

@ -117,7 +117,7 @@ reference of all supported functions.
The CMake configuration options object is very similar to the The CMake configuration options object is very similar to the
[[@cfg_data]] object] object returned [[@cfg_data]] object] object returned
by [[configuration_data]]. It by [[configuration_data]]. It
is generated by the `subproject_options` function is generated by the `subproject_options` method.
All configuration options have to be set *before* the subproject is All configuration options have to be set *before* the subproject is
configured and must be passed to the `subproject` method via the configured and must be passed to the `subproject` method via the
@ -131,7 +131,7 @@ together with the `options` kwarg.
### `subproject` object ### `subproject` object
This object is returned by the `subproject` function described above This object is returned by the `subproject` method described above
and supports the following methods: and supports the following methods:
- `dependency(target)` returns a dependency object for any CMake target. The - `dependency(target)` returns a dependency object for any CMake target. The
@ -139,7 +139,7 @@ and supports the following methods:
returned dependency object similar to the same kwarg in the returned dependency object similar to the same kwarg in the
[[dependency]] function. [[dependency]] function.
- `include_directories(target)` returns a Meson [[@inc]] - `include_directories(target)` returns a Meson [[@inc]]
object for the specified target. Using this function is not necessary object for the specified target. Using this method is not necessary
if the dependency object is used. if the dependency object is used.
- `target(target)` returns the raw build target. - `target(target)` returns the raw build target.
- `target_type(target)` returns the type of the target as a string - `target_type(target)` returns the type of the target as a string
@ -152,8 +152,8 @@ and supports the following methods:
### `cmake options` object ### `cmake options` object
This object is returned by the `subproject_options()` function and This object is returned by the `subproject_options()` method and
consumed by the `options` kwarg of the `subproject` function. The consumed by the `options` kwarg of the `subproject` method. The
following methods are supported: following methods are supported:
- `add_cmake_defines({'opt1': val1, ...})` add additional CMake commandline defines - `add_cmake_defines({'opt1': val1, ...})` add additional CMake commandline defines
@ -225,7 +225,7 @@ specification](Machine-files.md).
### cmake.write_basic_package_version_file() ### cmake.write_basic_package_version_file()
This function is the equivalent of the corresponding [CMake This method is the equivalent of the corresponding [CMake
function](https://cmake.org/cmake/help/latest/module/CMakePackageConfigHelpers.html#command:write_basic_package_version_file), function](https://cmake.org/cmake/help/latest/module/CMakePackageConfigHelpers.html#command:write_basic_package_version_file),
it generates a `name` package version file. it generates a `name` package version file.
@ -250,7 +250,7 @@ cmake.write_basic_package_version_file(name: 'myProject', version: '1.0.0')
### cmake.configure_package_config_file() ### cmake.configure_package_config_file()
This function is the equivalent of the corresponding [CMake This method is the equivalent of the corresponding [CMake
function](https://cmake.org/cmake/help/v3.11/module/CMakePackageConfigHelpers.html#generating-a-package-configuration-file), function](https://cmake.org/cmake/help/v3.11/module/CMakePackageConfigHelpers.html#generating-a-package-configuration-file),
it generates a `name` package configuration file from the `input` it generates a `name` package configuration file from the `input`
template file. Just like the cmake function in this file the template file. Just like the cmake function in this file the

Loading…
Cancel
Save