From 6b7c0c738b8439df6d2966de4a1296d32805366f Mon Sep 17 00:00:00 2001 From: sudden6 Date: Mon, 19 Jun 2017 11:22:26 +0200 Subject: [PATCH] fix(build): add missing rcc options This should reduce the qTox binary size. --- CMakeLists.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 58c9dc23e..b46586744 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -37,6 +37,8 @@ project(qtox) # Instruct CMake to run moc automatically when needed. set(CMAKE_AUTOMOC ON) +set(RCC_OPTIONS -compress 9 -threshold 0) + # Use C++11. set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions") @@ -138,6 +140,7 @@ qt5_add_resources( res.qrc ${CMAKE_CURRENT_BINARY_DIR}/translations.qrc DEPENDS ${${PROJECT_NAME}_QM_FILES} + OPTIONS ${RCC_OPTIONS} ) if(NOT SMILEYS) @@ -147,12 +150,14 @@ endif() if(NOT "${SMILEYS}" STREQUAL "DISABLED") qt5_add_resources( ${PROJECT_NAME}_RESOURCES - smileys/emojione.qrc) + smileys/emojione.qrc + OPTIONS ${RCC_OPTIONS}) if(NOT "${SMILEYS}" STREQUAL "MIN") qt5_add_resources( ${PROJECT_NAME}_RESOURCES - smileys/smileys.qrc) + smileys/smileys.qrc + OPTIONS ${RCC_OPTIONS}) endif() endif()