summaryrefslogtreecommitdiffstats
path: root/components
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2018-04-17 14:17:39 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2018-04-17 14:17:39 +0200
commitafaaeb6dc16315c78091653a2662be41781ddfd3 (patch)
tree6e6a28e39d6ee9a74c66c1aa9c13a4e930f4a431 /components
parent79f27c81dac3c8e7090cbc00cd65b3b9f5d8247a (diff)
downloadkube-afaaeb6dc16315c78091653a2662be41781ddfd3.tar.gz
kube-afaaeb6dc16315c78091653a2662be41781ddfd3.zip
Set the list of available account plugins from cmake
Diffstat (limited to 'components')
-rw-r--r--components/CMakeLists.txt12
-rw-r--r--components/accounts/AccountConfiguration.qml.in26
-rw-r--r--components/accounts/qmldir1
3 files changed, 39 insertions, 0 deletions
diff --git a/components/CMakeLists.txt b/components/CMakeLists.txt
index 9ae2824d..1f477a4d 100644
--- a/components/CMakeLists.txt
+++ b/components/CMakeLists.txt
@@ -10,4 +10,16 @@ endmacro(install_qml_component)
10install_qml_component(kube) 10install_qml_component(kube)
11add_subdirectory(kube/tests) 11add_subdirectory(kube/tests)
12install_qml_component(accounts) 12install_qml_component(accounts)
13
14
15#Convert list to comma-separated and quoted list.
16set(_AVAILABLE_ACCOUNT_PLUGINS ${AVAILABLE_ACCOUNT_PLUGINS})
17set(AVAILABLE_ACCOUNT_PLUGINS "")
18foreach(PLUGIN ${_AVAILABLE_ACCOUNT_PLUGINS})
19 set(AVAILABLE_ACCOUNT_PLUGINS "${AVAILABLE_ACCOUNT_PLUGINS}, \"${PLUGIN}\"")
20endforeach()
21string(SUBSTRING "${AVAILABLE_ACCOUNT_PLUGINS}" 2 -1 AVAILABLE_ACCOUNT_PLUGINS)
22
23configure_file(accounts/AccountConfiguration.qml.in accounts/AccountConfiguration.qml)
24install(FILES ${CMAKE_CURRENT_BINARY_DIR}/accounts/AccountConfiguration.qml DESTINATION ${QML_INSTALL_DIR}/org/kube/components/accounts)
13install_qml_component(mailviewer) 25install_qml_component(mailviewer)
diff --git a/components/accounts/AccountConfiguration.qml.in b/components/accounts/AccountConfiguration.qml.in
new file mode 100644
index 00000000..58c70b59
--- /dev/null
+++ b/components/accounts/AccountConfiguration.qml.in
@@ -0,0 +1,26 @@
1/*
2 Copyright (C) 2018 Christian Mollekopf, <mollekopf@kolabsys.com>
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License along
15 with this program; if not, write to the Free Software Foundation, Inc.,
16 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17*/
18
19pragma Singleton
20
21import QtQuick 2.7
22
23Item {
24 property var availableAccountPlugins: [@AVAILABLE_ACCOUNT_PLUGINS@]
25}
26
diff --git a/components/accounts/qmldir b/components/accounts/qmldir
index 24759d6a..26d2c9b6 100644
--- a/components/accounts/qmldir
+++ b/components/accounts/qmldir
@@ -2,3 +2,4 @@ module org.kube.components.accounts
2 2
3Accounts 1.0 Accounts.qml 3Accounts 1.0 Accounts.qml
4AccountWizard 1.0 AccountWizard.qml 4AccountWizard 1.0 AccountWizard.qml
5singleton AccountConfiguration 1.0 AccountConfiguration.qml