Skip to content

Commit b50ce36

Browse files
committed
Fixed packaging of polyglot library in Windows
This patch fixes the windows packaging for polyglot library it was previously bundling the lib file instead of the dll which caused the binary to not even start. Change-Id: Ife2733b71023e880a301a038aad02010f692c079
1 parent fa6789b commit b50ce36

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/CMakeLists.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,9 +480,15 @@ IF(BUNDLED_ABSEIL_LIBRARY)
480480
ENDIF()
481481

482482
IF (BUNDLED_POLYGLOT_DIR)
483+
SET(INSTALL_POLYGLOT_LIBRARY "${POLYGLOT_LIBRARY}")
484+
IF (WIN32)
485+
GET_FILENAME_COMPONENT(LIBPOLYGLOT_NAME_WE "${POLYGLOT_LIBRARY}" NAME_WE)
486+
GET_FILENAME_COMPONENT(LIBPOLYGLOT_DIR "${POLYGLOT_LIBRARY}" DIRECTORY)
487+
SET(INSTALL_POLYGLOT_LIBRARY "${LIBPOLYGLOT_DIR}/${LIBPOLYGLOT_NAME_WE}.dll")
488+
ENDIF()
483489
install_bundled_binaries(
484490
DESCRIPTION "Polyglot library"
485-
BINARIES ${POLYGLOT_LIBRARY}
491+
BINARIES "${INSTALL_POLYGLOT_LIBRARY}"
486492
DESTINATION "${INSTALL_LIBDIR}"
487493
TARGET mysqlsh
488494
)

0 commit comments

Comments
 (0)