From 2044992eed3e48909d17a4304ea25d3007d94d60 Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Mon, 28 Sep 2020 18:17:40 +0200 Subject: [PATCH] CMake: Strip binaries and libraries upon installation To avoid big artifact sizes, strip the binaries and libraries upon installation. This achieves stripping similar to QTBUG-69767 and QTBUG-81301 but arguably in a cleaner CMake way. See comment on PS34 of the unmerged commit 90b09fee44b08b65a436fd15fda2526e242f7b21 for details. Task-number: QTBUG-86053 Change-Id: I3ed929a8a7c74b88c480543212fc9551d8bde77f Reviewed-by: Qt CI Bot Reviewed-by: Joerg Bornemann --- bin/qt-cmake-private-install.cmake.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/qt-cmake-private-install.cmake.in b/bin/qt-cmake-private-install.cmake.in index bc9895791b..6d6f3f0f0e 100644 --- a/bin/qt-cmake-private-install.cmake.in +++ b/bin/qt-cmake-private-install.cmake.in @@ -9,7 +9,7 @@ if(NOT QT_BUILD_DIR) endif() foreach(config ${configs}) message(STATUS "Installing configuration: '${config}'") - set(args "${CMAKE_COMMAND}" --install ${QT_BUILD_DIR} --config "${config}") + set(args "${CMAKE_COMMAND}" --install ${QT_BUILD_DIR} --config "${config}" --strip) execute_process(COMMAND ${args} COMMAND_ECHO STDOUT RESULT_VARIABLE result)