Commit f0ee8496 authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

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
parent 6b2da933
...@@ -33,26 +33,17 @@ FUNCTION (INSTALL_DEBUG_SYMBOLS) ...@@ -33,26 +33,17 @@ FUNCTION (INSTALL_DEBUG_SYMBOLS)
SET(targets ${ARG_UNPARSED_ARGUMENTS}) SET(targets ${ARG_UNPARSED_ARGUMENTS})
FOREACH(target ${targets}) FOREACH(target ${targets})
GET_TARGET_PROPERTY(target_type ${target} TYPE) GET_TARGET_PROPERTY(target_type ${target} TYPE)
IF(target_type MATCHES "STATIC")
RETURN()
ENDIF()
set(comp "") set(comp "")
IF(target MATCHES "mysqld" OR type MATCHES "MODULE") IF((target STREQUAL "mysqld"))
#MESSAGE("PDB: ${targets}")
SET(comp Server) SET(comp Server)
ENDIF() 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) INSTALL(FILES $<TARGET_PDB_FILE:${target}> DESTINATION symbols COMPONENT Debuginfo)
SET(comp Debuginfo_archive_only) # not in MSI IF(comp)
ENDIF()
IF(NOT target_type MATCHES "STATIC")
INSTALL(FILES $<TARGET_PDB_FILE:${target}> DESTINATION ${ARG_INSTALL_LOCATION} COMPONENT ${comp}) INSTALL(FILES $<TARGET_PDB_FILE:${target}> DESTINATION ${ARG_INSTALL_LOCATION} COMPONENT ${comp})
ENDIF() ENDIF()
ENDFOREACH() ENDFOREACH()
......
...@@ -202,3 +202,15 @@ ADD_CUSTOM_TARGET( ...@@ -202,3 +202,15 @@ ADD_CUSTOM_TARGET(
) )
ADD_DEPENDENCIES(MSI_ESSENTIALS wixca) 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) ...@@ -9,7 +9,7 @@ IF(ESSENTIALS)
ENDIF() ENDIF()
ELSE() ELSE()
SET(CPACK_COMPONENTS_USED 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() ENDIF()
SET( WIX_FEATURE_MySQLServer_EXTRA_FEATURES "DBInstance;SharedClientServerComponents") SET( WIX_FEATURE_MySQLServer_EXTRA_FEATURES "DBInstance;SharedClientServerComponents")
......
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()
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)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment