1
0
mirror of https://github.com/mariadb-corporation/mariadb-connector-c.git synced 2025-08-08 14:02:17 +03:00

MSI package fixes (Windows)

This commit is contained in:
Georg Richter
2015-10-27 16:08:38 +01:00
parent a240b930fc
commit d46a64c4d7
3 changed files with 13 additions and 10 deletions

View File

@@ -7,8 +7,7 @@ PROJECT(mariadb-connector-c C)
SET(CPACK_PACKAGE_VERSION_MAJOR 3)
SET(CPACK_PACKAGE_VERSION_MINOR 0)
SET(CPACK_PACKAGE_VERSION_PATCH 0)
SET(CPACK_PACKAGE_VERSION_SUFFIX "_alpha")
SET(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}${CPACK_PACKAGE_VERSION_SUFFIX}")
SET(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
#Minimum required version is Cmake 2.8.8, since we need to build object libraries
IF(WIN32)
@@ -38,6 +37,10 @@ ENDIF()
INCLUDE(${CMAKE_SOURCE_DIR}/cmake/plugins.cmake)
IF(WIN32)
FILE(REMOVE ${CMAKE_BINARY_DIR}/win/packaging/plugin.conf)
ENDIF()
IF(MSVC)
# Speedup system tests
INCLUDE(${CMAKE_SOURCE_DIR}/cmake/WindowsCache.cmake)

View File

@@ -1,13 +1,11 @@
# plugin installation
MACRO(INSTALL_PLUGIN name binary_dir)
IF(NOT WIN32)
INSTALL(TARGETS ${name}
RUNTIME DESTINATION "${PLUGIN_INSTALL_DIR}"
LIBRARY DESTINATION "${PLUGIN_INSTALL_DIR}"
ARCHIVE DESTINATION "${PLUGIN_INSTALL_DIR}")
ELSE()
SET(MARIADB_PLUGINS "${MARIADB_PLUGINS} <File Id=\"${name}.dll\" Name=\"${name}.dll\" DiskId=\"1\" Source=\"${binary_dir}/${CMAKE_BUILD_TYPE}/${name}.dll\"/>\n")
MARK_AS_ADVANCED(MARIADB_PLUGINS)
IF(WIN32)
FILE(APPEND ${CMAKE_BINARY_DIR}/win/packaging/plugin.conf "<File Id=\"${name}.dll\" Name=\"${name}.dll\" DiskId=\"1\" Source=\"${binary_dir}/${CMAKE_BUILD_TYPE}/${name}.dll\"/>\n")
ENDIF()
ENDMACRO()

View File

@@ -44,6 +44,8 @@ IF (WITH_SIGNCODE)
COMMAND signtool sign ${SIGN_OPTIONS} ${CMAKE_BINARY_DIR}/plugins/auth/${CMAKE_BUILD_TYPE}/mysql_clear_password.dll)
ENDIF()
FILE(READ ${CMAKE_BINARY_DIR}/win/packaging/plugin.conf MARIADB_PLUGINS)
FOREACH(src ${MARIADB_CLIENT_INCLUDES})
STRING(REPLACE "-" "_" src_id ${src})
STRING(REPLACE "mysql/" "" src_id ${src_id})