Skip to content

Commit b20056f

Browse files
committed
doc: Fix wrong cmake command name find_module()
1 parent 1630c83 commit b20056f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

doc/usage.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,30 +6,30 @@ uses Connector/C++ it is enough to link that target with the `mysql::concpp`
66
target defined after loading the `mysql-concpp` module into the project, as
77
in this example:
88
~~~~~~
9-
find_module(mysql-concpp REQUIRED)
9+
find_package(mysql-concpp REQUIRED)
1010

1111
add_executable(my-target ...)
1212
target_link_libraries(my-target mysql::concpp)
1313
~~~~~~
1414
This ensures correct compiler and linker flags when building `my-target`
1515
so that connector public headers, the libraries and their dependencies are
1616
found when compiling and linking the target. See the CMake documentation
17-
for more information on `find_module()` command and on using CMake modules.
17+
for more information on `find_package()` command and on using CMake modules.
1818

1919
We focus here on the scenario where Connector/C++ is installed from a package
2020
published by MySQL. There are two variants of this scenario. Either
2121
the connector is installed system-wide via package manager such as RPM or DEB,
2222
or it is installed locally from TGZ or ZIP package. In case of system-wide
2323
installation connector components are installed to default locations and things
24-
are expected to work out-of-the-box. In this case `find_module(mysql-concpp)`
24+
are expected to work out-of-the-box. In this case `find_package(mysql-concpp)`
2525
command should work without any further configuration.
2626

2727
In case of local installation you need to tell CMake where to look for
2828
the `mysql-concpp` module. This can be done by setting the `mysql-concpp_DIR`
2929
variable to the top-level Connector/C++ install location:
3030
~~~~~~
3131
set(mysql-concpp_DIR "/path/to/concpp/install")
32-
find_module(mysql-concpp)
32+
find_package(mysql-concpp)
3333
~~~~~~
3434
(Alternatively the variable can be set when invoking `cmake` using
3535
`-Dmysql-concpp_DIR=/path/to/concpp/install` option).
@@ -193,7 +193,7 @@ When loading the `mysql-concpp` module a "debug" component can be required
193193
so that cmake will report error if debug variants of connector libraries
194194
are not found:
195195
~~~~~~
196-
find_module(mysql-concpp REQUIRE debug)
196+
find_package(mysql-concpp REQUIRE debug)
197197
~~~~~~
198198
Regardless of whether the "debug" component was required or not, the module
199199
will set variable `MYSQL_CONCPP_DEBUG_FOUND` to true if debug libraries were
@@ -218,7 +218,7 @@ For example:
218218
find_package(mysql-concpp)
219219
~~~~
220220
Note that `mysql::openssl` target must be defined before invoking
221-
`find_module(mysql-concpp)` in order to replace the default OpenSSL instance
221+
`find_package(mysql-concpp)` in order to replace the default OpenSSL instance
222222
used by the module.
223223

224224

0 commit comments

Comments
 (0)