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)
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")
......
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