Skip to content

Commit 81f0bc9

Browse files
committed
jdbc: Bundle OpenSSL dependency taken from server installation only if not already handled by the main connector.
1 parent 8e2a268 commit 81f0bc9

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

jdbc.cmake

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -256,15 +256,20 @@ install(
256256
# Install external dependencies of MySQL client library, such as OpenSSL,
257257
# if bundled with client library installation.
258258
#
259-
# TODO
259+
# Note: if main connector uses OpenSSL, then we will use the same libraries
260+
# to satisfy client library dependency. But if main connector does not use
261+
# OpenSSL, we copy required dependencies from MySQL installation.
260262
#
261263

262-
message("Installing external dependencies from: ${MYSQL_DIR}")
264+
if(BUNDLE_DEPENDENCIES AND WITH_SSL STREQUAL "bundled")
263265

264-
install(DIRECTORY "${MYSQL_DIR}/bin/" DESTINATION lib64
265-
FILES_MATCHING PATTERN "*${CMAKE_SHARED_LIBRARY_SUFFIX}"
266-
)
266+
message("Bundling OpenSSL libraries from: ${MYSQL_DIR}")
267+
268+
install(DIRECTORY "${MYSQL_DIR}/bin/" DESTINATION lib64
269+
FILES_MATCHING PATTERN "*${CMAKE_SHARED_LIBRARY_SUFFIX}"
270+
)
267271

272+
endif()
268273

269274
#############################################################################
270275
#

0 commit comments

Comments
 (0)