Skip to content

Commit 72c5573

Browse files
committed
WL#15112 Add checks for bundled 3rd party dependencies - post push fixes
Fix locations where openssl libraries bundled with the server are looked for. The MYSQL_DIR variable is not defined, look instead in the ..\bin folder next to MSQL_LIB_DIR. Change-Id: If3fa1f663c23b06b2a2eb53a453f3f117921ee1f
1 parent e6d1c91 commit 72c5573

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

CMakeLists.txt

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -471,9 +471,12 @@ macro(bundle_libs to_bundle ignored)
471471

472472
#message("== bundle_libs: ${${to_bundle}}")
473473

474-
if(ARGN)
474+
unset(_bundled)
475+
unset(_bundled1)
475476

476-
file(GLOB _bundled ${ARGN})
477+
if(${ARGC} GREATER 2)
478+
479+
file(GLOB _bundled ${ARGN})
477480

478481
else()
479482

@@ -485,7 +488,7 @@ macro(bundle_libs to_bundle ignored)
485488
# On windows, libs are in bin directory
486489

487490
if(WIN32)
488-
file(GLOB _bundled1 "${MYSQL_DIR}/bin/*${CMAKE_SHARED_LIBRARY_SUFFIX}*")
491+
file(GLOB _bundled1 "${MYSQL_LIB_DIR}/../bin/*${CMAKE_SHARED_LIBRARY_SUFFIX}*")
489492
endif()
490493

491494
endif()
@@ -676,16 +679,21 @@ if(BUNDLE_DEPENDENCIES)
676679

677680
# Bundle additional libraries listed in BUNDLED_LIBS
678681
# For OpenSSL libs, first look in the location of the library that
679-
# is actually being used in the build.
682+
# is actually being used in the build (for the win case, look also in ../bin/
683+
# because this is where the DLLs can be found, as opposed to the
684+
# corresponding link libraries).
680685

681686
#message("== BUNDLED_LIBS: ${BUNDLED_LIBS}")
682687
#message("== IGNORED_LIBS: ${IGNORED_LIBS}")
683688

684689
get_filename_component(OPENSSL_DIR ${OPENSSL_LIBRARY} DIRECTORY)
685690

691+
#message(STATUS "bundle openssl libs")
686692
bundle_libs(BUNDLED_LIBS extra_libs
687693
"${OPENSSL_DIR}/*${CMAKE_SHARED_LIBRARY_SUFFIX}*"
694+
"${OPENSSL_DIR}/../bin/*${CMAKE_SHARED_LIBRARY_SUFFIX}*"
688695
)
696+
#message(STATUS "bundle other libs")
689697
unset(extra_libs)
690698
bundle_libs(BUNDLED_LIBS extra_libs)
691699

0 commit comments

Comments
 (0)