Repository navigation
Expand file tree
/
Copy pathdefault-theme.pro
More file actions
61 lines (42 loc) · 1.72 KB
/
Copy pathdefault-theme.pro
File metadata and controls
61 lines (42 loc) · 1.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
TEMPLATE = lib
CONFIG += c++11 plugin link_pkgconfig
QT += qml quick quickcontrols2
TARGET = $$qtLibraryTarget(default-theme)
include("../../config.pri")
target.path = $${PREFIX}/themes/default-theme
SOURCES += \
defaulttheme.cpp \
themeiconprovider.cpp
HEADERS += \
defaulttheme.h \
themeiconprovider.h
RESOURCES += default-theme.qrc
# Additional import path used to resolve QML modules in Qt Creator's code model
QML_IMPORT_PATH += $${PWD}/qml/theme
QML_IMPORT_PATH += $$OUT_PWD
THEMEFILES += \
$${PWD}/theme.json \
$${PWD}/qml/theme/qmldir \
$${PWD}/qml/theme/designer/hudtheme.metainfo \
$${PWD}/qml/theme/backgrounds/*
#remove previous theme files
theme_files_remove.commands = rm -rf $$OUT_PWD/HUDTheme
##recursively copy the theme folder
theme_files_copy.commands = $(COPY_DIR) $$PWD/qml/HUDTheme $$OUT_PWD/HUDTheme
theme_files_copy.depends = theme_files_remove
#remove previous settings files
settings_files_remove.commands = rm -rf $$OUT_PWD/HUDSettingsPage
settings_files_remove.depends = theme_files_copy
##recursively copy the setting page folder
settingpage_files_copy.commands = $(COPY_DIR) $$PWD/qml/HUDSettingsPage $$OUT_PWD/HUDSettingsPage
settingpage_files_copy.depends = settings_files_remove
##attach the copy command to make target
first.depends = $(first) theme_files_copy settingpage_files_copy
QMAKE_EXTRA_TARGETS += first theme_files_remove theme_files_copy settings_files_remove settingpage_files_copy
DISTFILES += THEMEFILES \
theme.json
theme.files = $${PWD}/qml/HUDTheme/*
theme.path = $$PREFIX/themes/default-theme/HUDTheme
settingpage.files = $${PWD}/qml/HUDSettingsPage/*
settingpage.path = $$PREFIX/themes/default-theme/HUDSettingsPage
INSTALLS += target theme settingpage