From f0ee8496d2ff03a9b36739ab941eb9b06b87fea1 Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Fri, 14 Sep 2018 18:53:27 +0100 Subject: 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 --- win/packaging/CMakeLists.txt | 12 ++++++++++++ win/packaging/CPackWixConfig.cmake | 2 +- win/packaging/CPackZIPConfig.cmake | 11 +++++++++++ win/packaging/CPackZIPDebugInfoConfig.cmake | 6 ++++++ 4 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 win/packaging/CPackZIPConfig.cmake create mode 100644 win/packaging/CPackZIPDebugInfoConfig.cmake (limited to 'win/packaging') diff --git a/win/packaging/CMakeLists.txt b/win/packaging/CMakeLists.txt index d33516044f6..b3ccaaa308f 100644 --- a/win/packaging/CMakeLists.txt +++ b/win/packaging/CMakeLists.txt @@ -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} +) + diff --git a/win/packaging/CPackWixConfig.cmake b/win/packaging/CPackWixConfig.cmake index 581f4925d41..994b121797a 100644 --- a/win/packaging/CPackWixConfig.cmake +++ b/win/packaging/CPackWixConfig.cmake @@ -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") diff --git a/win/packaging/CPackZIPConfig.cmake b/win/packaging/CPackZIPConfig.cmake new file mode 100644 index 00000000000..5afbffbf0fe --- /dev/null +++ b/win/packaging/CPackZIPConfig.cmake @@ -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() diff --git a/win/packaging/CPackZIPDebugInfoConfig.cmake b/win/packaging/CPackZIPDebugInfoConfig.cmake new file mode 100644 index 00000000000..674c1675399 --- /dev/null +++ b/win/packaging/CPackZIPDebugInfoConfig.cmake @@ -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) -- cgit v1.2.1