From d177405913768a256c43433b56353d639c4b3281 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Sat, 27 Jun 2020 03:06:16 +0200 Subject: [PATCH] Don't compile qml by default While it does improve performance a bit, it is simply bad for most distributions, since they don't know and probably don't want to recompile Nheko. So default it to off. Anyone who wants it can still toggle it on and it is almost no maintenance cost. --- CMakeLists.txt | 1 + cmake/Translations.cmake | 2 +- io.github.NhekoReborn.Nheko.json | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 84438045..6bbfa696 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,6 +4,7 @@ option(APPVEYOR_BUILD "Build on appveyor" OFF) option(CI_BUILD "Set when building in CI. Enables -Werror where possible" OFF) option(ASAN "Compile with address sanitizers" OFF) option(QML_DEBUGGING "Enable qml debugging" OFF) +option(COMPILE_QML "Compile Qml. It will make Nheko faster, but you will need to recompile it, when you update Qt." OFF) set( CMAKE_TOOLCHAIN_FILE "${CMAKE_CURRENT_LIST_DIR}/toolchain.cmake" diff --git a/cmake/Translations.cmake b/cmake/Translations.cmake index 16120219..887697a8 100644 --- a/cmake/Translations.cmake +++ b/cmake/Translations.cmake @@ -21,7 +21,7 @@ if(NOT EXISTS ${_qrc}) endif() qt5_add_resources(LANG_QRC ${_qrc}) -if(Qt5QuickCompiler_FOUND) +if(Qt5QuickCompiler_FOUND AND COMPILE_QML) qtquick_compiler_add_resources(QRC resources/res.qrc) else() qt5_add_resources(QRC resources/res.qrc) diff --git a/io.github.NhekoReborn.Nheko.json b/io.github.NhekoReborn.Nheko.json index 33acf34b..898d5003 100644 --- a/io.github.NhekoReborn.Nheko.json +++ b/io.github.NhekoReborn.Nheko.json @@ -171,7 +171,8 @@ { "config-opts": [ "-DCMAKE_BUILD_TYPE=Release", - "-DLMDBXX_INCLUDE_DIR=.deps/lmdbxx" + "-DLMDBXX_INCLUDE_DIR=.deps/lmdbxx", + "-DCOMPILE_QML=ON" ], "buildsystem": "cmake-ninja", "name": "nheko",