mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 02:05:57 +01:00
MDEV-15088 Lighter version of Windows Zip distributions
Add new target win_package, that produces a) light ZIP (no test suite, no sql-bench, no debugsymbols) b) debug symbols ZIP
This commit is contained in:
parent
6b2da93359
commit
f0ee8496d2
5 changed files with 37 additions and 17 deletions
|
@ -33,26 +33,17 @@ FUNCTION (INSTALL_DEBUG_SYMBOLS)
|
|||
SET(targets ${ARG_UNPARSED_ARGUMENTS})
|
||||
FOREACH(target ${targets})
|
||||
GET_TARGET_PROPERTY(target_type ${target} TYPE)
|
||||
|
||||
IF(target_type MATCHES "STATIC")
|
||||
RETURN()
|
||||
ENDIF()
|
||||
set(comp "")
|
||||
|
||||
IF(target MATCHES "mysqld" OR type MATCHES "MODULE")
|
||||
#MESSAGE("PDB: ${targets}")
|
||||
|
||||
IF((target STREQUAL "mysqld"))
|
||||
SET(comp Server)
|
||||
ENDIF()
|
||||
|
||||
IF(NOT comp MATCHES Server)
|
||||
IF(ARG_COMPONENT MATCHES Development
|
||||
OR ARG_COMPONENT MATCHES SharedLibraries
|
||||
OR ARG_COMPONENT MATCHES Embedded)
|
||||
SET(comp Debuginfo)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
IF(NOT comp)
|
||||
SET(comp Debuginfo_archive_only) # not in MSI
|
||||
ENDIF()
|
||||
IF(NOT target_type MATCHES "STATIC")
|
||||
INSTALL(FILES $<TARGET_PDB_FILE:${target}> DESTINATION symbols COMPONENT Debuginfo)
|
||||
IF(comp)
|
||||
INSTALL(FILES $<TARGET_PDB_FILE:${target}> DESTINATION ${ARG_INSTALL_LOCATION} COMPONENT ${comp})
|
||||
ENDIF()
|
||||
ENDFOREACH()
|
||||
|
|
|
@ -202,3 +202,15 @@ ADD_CUSTOM_TARGET(
|
|||
)
|
||||
ADD_DEPENDENCIES(MSI_ESSENTIALS wixca)
|
||||
|
||||
|
||||
IF(CMAKE_GENERATOR MATCHES "Visual Studio")
|
||||
SET(CPACK_CONFIG_PARAM -C $(Configuration))
|
||||
ENDIF()
|
||||
|
||||
ADD_CUSTOM_TARGET(
|
||||
win_package
|
||||
COMMAND cpack ${CPACK_CONFIG_PARAM} --config ${CMAKE_CURRENT_SOURCE_DIR}/CPackZipConfig.cmake
|
||||
COMMAND cpack ${CPACK_CONFIG_PARAM} --config ${CMAKE_CURRENT_SOURCE_DIR}/CPackZipDebugInfoConfig.cmake
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
)
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ IF(ESSENTIALS)
|
|||
ENDIF()
|
||||
ELSE()
|
||||
SET(CPACK_COMPONENTS_USED
|
||||
"Server;Client;Development;SharedLibraries;Documentation;Readme;Debuginfo;Common;VCCRT;connect-engine;ClientPlugins;gssapi-server;gssapi-client;aws-key-management;rocksdb-engine;backup")
|
||||
"Server;Client;Development;SharedLibraries;Documentation;Readme;Common;VCCRT;connect-engine;ClientPlugins;gssapi-server;gssapi-client;aws-key-management;rocksdb-engine;backup")
|
||||
ENDIF()
|
||||
|
||||
SET( WIX_FEATURE_MySQLServer_EXTRA_FEATURES "DBInstance;SharedClientServerComponents")
|
||||
|
|
11
win/packaging/CPackZIPConfig.cmake
Normal file
11
win/packaging/CPackZIPConfig.cmake
Normal file
|
@ -0,0 +1,11 @@
|
|||
INCLUDE(CPackConfig.cmake)
|
||||
SET(CPACK_GENERATOR ZIP)
|
||||
set(CPACK_ARCHIVE_COMPONENT_INSTALL ON)
|
||||
set(CPACK_COMPONENTS_GROUPING ALL_COMPONENTS_IN_ONE)
|
||||
SET(CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY ON)
|
||||
FOREACH(it DebugBinaries Debuginfo IniFiles Junk Test SqlBench)
|
||||
list(FIND CPACK_COMPONENTS_ALL "${it}" index)
|
||||
IF(index GREATER 0)
|
||||
LIST(REMOVE_AT CPACK_COMPONENTS_ALL ${index})
|
||||
ENDIF()
|
||||
ENDFOREACH()
|
6
win/packaging/CPackZIPDebugInfoConfig.cmake
Normal file
6
win/packaging/CPackZIPDebugInfoConfig.cmake
Normal file
|
@ -0,0 +1,6 @@
|
|||
INCLUDE(CPackConfig.cmake)
|
||||
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}-debugsymbols")
|
||||
set(CPACK_ARCHIVE_COMPONENT_INSTALL ON)
|
||||
set(CPACK_COMPONENTS_GROUPING ALL_COMPONENTS_IN_ONE)
|
||||
SET(CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY ON)
|
||||
SET(CPACK_COMPONENTS_ALL Debuginfo)
|
Loading…
Add table
Reference in a new issue