cmake_minimum_required(VERSION 3.6)
set(CMAKE_CXX_STANDARD 14)
+cmake_policy(SET CMP0071 NEW) # Enable use of QtQuick compiler/generated code
project(client)
-DQT_MESSAGELOGCONTEXT #enable function name and line number in debug output
)
+if(QUICK_COMPILER)
+ add_definitions(-DQUICK_COMPILER) # Enable use of QtQuick compiler
+endif()
+
# if we cannot get it from git, directly try .tag (packages)
# this will work if the tar balls have been properly created
# via git-archive.
set(BIN_INSTALL_DIR "${APPLICATION_NAME}.app/Contents/MacOS")
endif()
+
+option(QUICK_COMPILER "Use QtQuick compiler to improve performance" OFF)
+
# this option removes Http authentication, keychain, shibboleth etc and is intended for
# external authentication mechanisms
option(TOKEN_AUTH_ONLY "TOKEN_AUTH_ONLY" OFF)
project(gui)
find_package(Qt5 REQUIRED COMPONENTS Widgets Svg Qml Quick QuickControls2 Xml Network)
+
+if(QUICK_COMPILER)
+ find_package(Qt5QuickCompiler)
+ set_package_properties(Qt5QuickCompiler PROPERTIES
+ DESCRIPTION "Compile QML at build time"
+ TYPE OPTIONAL
+ )
+endif()
+
if (NOT TARGET Qt5::GuiPrivate)
message(FATAL_ERROR "Could not find GuiPrivate component of Qt5. It might be shipped as a separate package, please check that.")
endif()
endif()
configure_file(${CMAKE_SOURCE_DIR}/theme.qrc.in ${CMAKE_SOURCE_DIR}/theme.qrc)
-
-set(MIRALL_RC_SRC ../../resources.qrc)
-list(APPEND MIRALL_RC_SRC ${CMAKE_SOURCE_DIR}/theme.qrc)
set(theme_dir ${CMAKE_SOURCE_DIR}/theme)
set(client_UI_SRCS
addcertificatedialog.ui
proxyauthdialog.ui
mnemonicdialog.ui
- UserStatusSelector.qml
- UserStatusSelectorDialog.qml
- tray/ActivityActionButton.qml
- tray/ActivityItem.qml
- tray/ActivityList.qml
- tray/Window.qml
- tray/UserLine.qml
- tray/UnifiedSearchInputContainer.qml
- tray/UnifiedSearchResultFetchMoreTrigger.qml
- tray/UnifiedSearchResultItem.qml
- tray/UnifiedSearchResultItemSkeleton.qml
- tray/UnifiedSearchResultItemSkeletonContainer.qml
- tray/UnifiedSearchResultListItem.qml
- tray/UnifiedSearchResultNothingFound.qml
- tray/UnifiedSearchResultSectionItem.qml
wizard/flow2authwidget.ui
wizard/owncloudadvancedsetuppage.ui
wizard/owncloudconnectionmethoddialog.ui
wizard/welcomepage.ui
)
+if(QUICK_COMPILER)
+ qtquick_compiler_add_resources(client_UI_SRCS ../../resources.qrc ${CMAKE_SOURCE_DIR}/theme.qrc)
+else()
+ qt_add_resources(client_UI_SRCS ../../resources.qrc ${CMAKE_SOURCE_DIR}/theme.qrc)
+endif()
+
set(client_SRCS
accountmanager.cpp
accountsettings.cpp
ENDIF()
set( final_src
- ${MIRALL_RC_SRC}
${client_SRCS}
${client_UI_SRCS}
${guiMoc}