@@ -6,30 +6,30 @@ uses Connector/C++ it is enough to link that target with the `mysql::concpp`
6
6
target defined after loading the `mysql-concpp` module into the project, as
7
7
in this example:
8
8
~~~~~~
9
- find_module (mysql-concpp REQUIRED)
9
+ find_package (mysql-concpp REQUIRED)
10
10
11
11
add_executable(my-target ...)
12
12
target_link_libraries(my-target mysql::concpp)
13
13
~~~~~~
14
14
This ensures correct compiler and linker flags when building `my-target`
15
15
so that connector public headers, the libraries and their dependencies are
16
16
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.
18
18
19
19
We focus here on the scenario where Connector/C++ is installed from a package
20
20
published by MySQL. There are two variants of this scenario. Either
21
21
the connector is installed system-wide via package manager such as RPM or DEB,
22
22
or it is installed locally from TGZ or ZIP package. In case of system-wide
23
23
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)`
25
25
command should work without any further configuration.
26
26
27
27
In case of local installation you need to tell CMake where to look for
28
28
the `mysql-concpp` module. This can be done by setting the `mysql-concpp_DIR`
29
29
variable to the top-level Connector/C++ install location:
30
30
~~~~~~
31
31
set(mysql-concpp_DIR "/path/to/concpp/install")
32
- find_module (mysql-concpp)
32
+ find_package (mysql-concpp)
33
33
~~~~~~
34
34
(Alternatively the variable can be set when invoking `cmake` using
35
35
`-Dmysql-concpp_DIR=/path/to/concpp/install` option).
@@ -193,7 +193,7 @@ When loading the `mysql-concpp` module a "debug" component can be required
193
193
so that cmake will report error if debug variants of connector libraries
194
194
are not found:
195
195
~~~~~~
196
- find_module (mysql-concpp REQUIRE debug)
196
+ find_package (mysql-concpp REQUIRE debug)
197
197
~~~~~~
198
198
Regardless of whether the "debug" component was required or not, the module
199
199
will set variable `MYSQL_CONCPP_DEBUG_FOUND` to true if debug libraries were
@@ -218,7 +218,7 @@ For example:
218
218
find_package(mysql-concpp)
219
219
~~~~
220
220
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
222
222
used by the module.
223
223
224
224
0 commit comments