forked from nymea/nymea-plugins-zigbee
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnymea-plugins-zigbee.pro
More file actions
54 lines (44 loc) · 1.53 KB
/
nymea-plugins-zigbee.pro
File metadata and controls
54 lines (44 loc) · 1.53 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
TEMPLATE = subdirs
PLUGIN_DIRS = \
zigbeedevelco \
zigbeeeurotronic \
zigbeegeneric \
zigbeegewiss \
zigbeejung \
zigbeelumi \
zigbeephilipshue \
zigbeetradfri \
zigbeetuya \
message(============================================)
message("Qt version:" $$[QT_VERSION])
plugininfo.depends = FORCE
for (entry, PLUGIN_DIRS):plugininfo.commands += test -d $${entry} || mkdir -p $${entry}; cd $${entry} && qmake -o Makefile $$PWD/$${entry}/$${entry}.pro && cd ..;
for (entry, PLUGIN_DIRS):plugininfo.commands += make -C $${entry} plugininfo.h;
QMAKE_EXTRA_TARGETS += plugininfo
# Translations:
# make lupdate to update .ts files
lupdate.depends = FORCE plugininfo
for (entry, PLUGIN_DIRS):lupdate.commands += make -C $${entry} lupdate;
QMAKE_EXTRA_TARGETS += lupdate
# make lrelease to build .qm from .ts
lrelease.depends = FORCE
for (entry, PLUGIN_DIRS):lrelease.commands += lrelease $$files($$PWD/$${entry}/translations/*.ts, true);
QMAKE_EXTRA_TARGETS += lrelease
# For Qt-Creator's code model: Add CPATH to INCLUDEPATH explicitly
INCLUDEPATH += $$(CPATH)
message("Usage: qmake [srcdir] [WITH_PLUGINS=\"...\"] [WITHOUT_PLUGINS=\"...\"]")
isEmpty(WITH_PLUGINS) {
PLUGINS = $${PLUGIN_DIRS}
} else {
PLUGINS = $${WITH_PLUGINS}
}
PLUGINS-=$${WITHOUT_PLUGINS}
message("Building plugins:")
for(plugin, PLUGINS) {
exists($${plugin}) {
SUBDIRS*= $${plugin}
message("- $${plugin}")
} else {
error("Invalid plugin \"$${plugin}\".")
}
}