Skip to content

Commit c510655

Browse files
committed
Bug#27874173: Add MYSQL_CONFIG_EXECUTABLE option to be used by
FindMySQL.cmake from JDBC
1 parent a04aedd commit c510655

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

doc/building.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,8 @@ configuration step. This option is disabled by default. If specified, additional
229229
build dependencies must be satisfied:
230230

231231
- The MySQL 8.0 client library is needed. If `cmake` cannot find it at
232-
the default locations, pass the `-DMYSQL_DIR=<path_to_mysql_server_dir>`
233-
option.
232+
the default locations, pass the `-DMYSQL_DIR=<path_to_mysql_server_dir>` or
233+
the `-DMYSQL_CONFIG_EXECUTABLE=<path_to_mysql_config_executable` option.
234234

235235
- Boost libraries are always required in this case. As explained above, use
236236
the `WITH_BOOST` option if `cmake` cannot find Boost at the default locations.
@@ -259,8 +259,9 @@ If building static libraries, the static legacy library has name:
259259

260260
It is possible to build an additional test application `jdbc_test` for testing
261261
the legacy connector library. To do this, pass the `-DWITH_JDBC=ON` cmake option
262-
when configuring the build of test applications. Also, `MYSQL_DIR`
263-
and `WITH_BOOST` must be set if cmake cannot find the required dependencies.
262+
when configuring the build of test applications. Also, `MYSQL_DIR` or
263+
`MYSQL_CONFIG_EXECUTABLE` and `WITH_BOOST` must be set if cmake cannot find the
264+
required dependencies.
264265

265266
The connection-string argument that the `jdbc_test` application accepts must
266267
be in the form specified by the JDBC API. The user name is passed as the second

jdbc.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ if(MYSQL_DIR)
3434
list(APPEND jdbc_cmake_opts -DMYSQL_DIR=${MYSQL_DIR})
3535
endif()
3636

37+
if(MYSQL_CONFIG_EXECUTABLE)
38+
list(APPEND jdbc_cmake_opts -DMYSQL_CONFIG_EXECUTABLE=${MYSQL_CONFIG_EXECUTABLE})
39+
endif()
40+
3741
list(APPEND jdbc_cmake_opts -DMYSQLCLIENT_STATIC_LINKING=ON)
3842

3943
if(CMAKE_BUILD_TYPE)

0 commit comments

Comments
 (0)