diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-04-17 14:17:39 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-04-17 14:17:39 +0200 |
commit | afaaeb6dc16315c78091653a2662be41781ddfd3 (patch) | |
tree | 6e6a28e39d6ee9a74c66c1aa9c13a4e930f4a431 /components | |
parent | 79f27c81dac3c8e7090cbc00cd65b3b9f5d8247a (diff) | |
download | kube-afaaeb6dc16315c78091653a2662be41781ddfd3.tar.gz kube-afaaeb6dc16315c78091653a2662be41781ddfd3.zip |
Set the list of available account plugins from cmake
Diffstat (limited to 'components')
-rw-r--r-- | components/CMakeLists.txt | 12 | ||||
-rw-r--r-- | components/accounts/AccountConfiguration.qml.in | 26 | ||||
-rw-r--r-- | components/accounts/qmldir | 1 |
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) | |||
10 | install_qml_component(kube) | 10 | install_qml_component(kube) |
11 | add_subdirectory(kube/tests) | 11 | add_subdirectory(kube/tests) |
12 | install_qml_component(accounts) | 12 | install_qml_component(accounts) |
13 | |||
14 | |||
15 | #Convert list to comma-separated and quoted list. | ||
16 | set(_AVAILABLE_ACCOUNT_PLUGINS ${AVAILABLE_ACCOUNT_PLUGINS}) | ||
17 | set(AVAILABLE_ACCOUNT_PLUGINS "") | ||
18 | foreach(PLUGIN ${_AVAILABLE_ACCOUNT_PLUGINS}) | ||
19 | set(AVAILABLE_ACCOUNT_PLUGINS "${AVAILABLE_ACCOUNT_PLUGINS}, \"${PLUGIN}\"") | ||
20 | endforeach() | ||
21 | string(SUBSTRING "${AVAILABLE_ACCOUNT_PLUGINS}" 2 -1 AVAILABLE_ACCOUNT_PLUGINS) | ||
22 | |||
23 | configure_file(accounts/AccountConfiguration.qml.in accounts/AccountConfiguration.qml) | ||
24 | install(FILES ${CMAKE_CURRENT_BINARY_DIR}/accounts/AccountConfiguration.qml DESTINATION ${QML_INSTALL_DIR}/org/kube/components/accounts) | ||
13 | install_qml_component(mailviewer) | 25 | install_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 | |||
19 | pragma Singleton | ||
20 | |||
21 | import QtQuick 2.7 | ||
22 | |||
23 | Item { | ||
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 | ||
3 | Accounts 1.0 Accounts.qml | 3 | Accounts 1.0 Accounts.qml |
4 | AccountWizard 1.0 AccountWizard.qml | 4 | AccountWizard 1.0 AccountWizard.qml |
5 | singleton AccountConfiguration 1.0 AccountConfiguration.qml | ||